jupyterlab 4.4.0b0__py3-none-any.whl → 4.4.0b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jupyterlab/_version.py +1 -1
- jupyterlab/extensions/pypi.py +45 -13
- jupyterlab/galata/@jupyterlab/galata-extension/build_log.json +100 -100
- jupyterlab/galata/@jupyterlab/galata-extension/package.json +11 -11
- jupyterlab/galata/@jupyterlab/galata-extension/static/{remoteEntry.5ba994114aebd508f8b4.js → remoteEntry.b12d8bce4d1a7f968cf5.js} +3 -3
- jupyterlab/labapp.py +5 -0
- jupyterlab/schemas/@jupyterlab/application-extension/context-menu.json +5 -0
- jupyterlab/schemas/@jupyterlab/application-extension/package.json.orig +10 -10
- jupyterlab/schemas/@jupyterlab/apputils-extension/package.json.orig +14 -14
- jupyterlab/schemas/@jupyterlab/apputils-extension/sessions-settings.json +25 -0
- jupyterlab/schemas/@jupyterlab/cell-toolbar-extension/package.json.orig +6 -6
- jupyterlab/schemas/@jupyterlab/celltags-extension/package.json.orig +5 -5
- jupyterlab/schemas/@jupyterlab/codemirror-extension/package.json.orig +8 -8
- jupyterlab/schemas/@jupyterlab/completer-extension/package.json.orig +7 -7
- jupyterlab/schemas/@jupyterlab/console-extension/package.json.orig +13 -13
- jupyterlab/schemas/@jupyterlab/csvviewer-extension/package.json.orig +10 -10
- jupyterlab/schemas/@jupyterlab/debugger-extension/package.json.orig +17 -17
- jupyterlab/schemas/@jupyterlab/docmanager-extension/package.json.orig +12 -12
- jupyterlab/schemas/@jupyterlab/documentsearch-extension/package.json.orig +6 -6
- jupyterlab/schemas/@jupyterlab/extensionmanager-extension/package.json.orig +7 -7
- jupyterlab/schemas/@jupyterlab/filebrowser-extension/package.json.orig +13 -13
- jupyterlab/schemas/@jupyterlab/fileeditor-extension/package.json.orig +23 -23
- jupyterlab/schemas/@jupyterlab/help-extension/package.json.orig +8 -11
- jupyterlab/schemas/@jupyterlab/htmlviewer-extension/package.json.orig +9 -9
- jupyterlab/schemas/@jupyterlab/hub-extension/package.json.orig +6 -6
- jupyterlab/schemas/@jupyterlab/imageviewer-extension/package.json.orig +6 -6
- jupyterlab/schemas/@jupyterlab/inspector-extension/package.json.orig +9 -9
- jupyterlab/schemas/@jupyterlab/launcher-extension/package.json.orig +7 -7
- jupyterlab/schemas/@jupyterlab/logconsole-extension/package.json.orig +10 -10
- jupyterlab/schemas/@jupyterlab/lsp-extension/package.json.orig +8 -8
- jupyterlab/schemas/@jupyterlab/mainmenu-extension/package.json.orig +11 -11
- jupyterlab/schemas/@jupyterlab/markdownviewer-extension/package.json.orig +9 -9
- jupyterlab/schemas/@jupyterlab/mathjax-extension/package.json.orig +3 -3
- jupyterlab/schemas/@jupyterlab/metadataform-extension/package.json.orig +7 -7
- jupyterlab/schemas/@jupyterlab/notebook-extension/package.json.orig +30 -30
- jupyterlab/schemas/@jupyterlab/running-extension/package.json.orig +12 -12
- jupyterlab/schemas/@jupyterlab/settingeditor-extension/package.json.orig +11 -11
- jupyterlab/schemas/@jupyterlab/shortcuts-extension/package.json.orig +6 -6
- jupyterlab/schemas/@jupyterlab/statusbar-extension/package.json.orig +6 -6
- jupyterlab/schemas/@jupyterlab/terminal-extension/package.json.orig +11 -11
- jupyterlab/schemas/@jupyterlab/toc-extension/package.json.orig +6 -6
- jupyterlab/schemas/@jupyterlab/tooltip-extension/package.json.orig +11 -11
- jupyterlab/schemas/@jupyterlab/translation-extension/package.json.orig +6 -6
- jupyterlab/schemas/@jupyterlab/workspaces-extension/package.json.orig +12 -12
- jupyterlab/staging/index.js +57 -5
- jupyterlab/staging/package.json +154 -154
- jupyterlab/staging/yarn.lock +2039 -1709
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/1838.839690ff17ec3c532f0a.js → jupyterlab/static/1838.9bf831bfb74f78497b59.js +1 -1
- jupyterlab/static/{1909.7487a09fefbe7f9eabb6.js → 1909.be26e8d7644d4993c6aa.js} +2 -2
- jupyterlab/static/{2211.3123543dcc217549bbb0.js → 2211.027bd80515301c787fe0.js} +1 -1
- jupyterlab/static/227.78c61729cb21799c0452.js +2 -0
- jupyterlab/static/{2462.90740e3b1fddd10acc1a.js → 2462.01ca4ff30eb4234641f9.js} +1 -1
- jupyterlab/static/2880.8483d51b11998bfe8e4b.js +1 -0
- jupyterlab/static/3282.22e78350d54fcaf3c6c8.js +7 -0
- jupyterlab/static/{4010.ceaba4c0034c0f4daf34.js → 4010.830bad07f9e50a12866c.js} +1 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/5289.30ae4288ff93aff43a23.js → jupyterlab/static/5289.f11a5ddad5575f0663fb.js +1 -1
- jupyterlab/static/5987.0b8fc9e61cc5bb1d035b.js +1 -0
- jupyterlab/static/6170.534f97d39074ab915191.js +1 -0
- jupyterlab/static/6180.45663caa5943eb3356f0.js +1 -0
- jupyterlab/static/{8820.6b625052509edd223505.js → 6439.1723c0b3882bf535486e.js} +1 -1
- jupyterlab/static/6733.8d9d506485cd873c82a3.js +2 -0
- jupyterlab/static/{6896.9a90c3217d8d3da90788.js → 6896.af1d649e0efae70b7b1a.js} +1 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/6986.440497af0277a8043b7a.js → jupyterlab/static/6986.a2b460afbc0594f06bb9.js +1 -1
- jupyterlab/static/8020.260d585ebb22b2a2508f.js +1 -0
- jupyterlab/static/8368.d4b9fd61ecaa847b1f19.js +1 -0
- jupyterlab/static/8778.a3883f9acac5a903d6be.js +1 -0
- jupyterlab/static/8820.e60b512def8b8a9953d9.js +1 -0
- jupyterlab/static/build_log.json +99 -99
- jupyterlab/static/index.html +1 -1
- jupyterlab/static/index.out.js +57 -5
- jupyterlab/static/jlab_core.fe469fdcf594e81de1e4.js +1 -0
- jupyterlab/static/main.4b5c8dc62459959f1ba7.js +1 -0
- jupyterlab/static/package.json +154 -154
- jupyterlab/static/third-party-licenses.json +105 -117
- jupyterlab/tests/mock_packages/extension/package.json +3 -3
- jupyterlab/tests/mock_packages/interop/consumer/package.json +3 -3
- jupyterlab/tests/mock_packages/interop/provider/package.json +3 -3
- jupyterlab/tests/mock_packages/interop/token/package.json +1 -1
- jupyterlab/tests/mock_packages/service-manager-extension/package.json +3 -3
- jupyterlab/tests/mock_packages/test_no_hyphens/yarn.lock +3 -3
- jupyterlab/tests/test_extensions.py +68 -0
- jupyterlab/tests/test_jupyterlab.py +15 -0
- jupyterlab/tests/test_plugin_manager_handler.py +82 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/context-menu.json +5 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/package.json.orig +10 -10
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/package.json.orig +14 -14
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/sessions-settings.json +25 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/cell-toolbar-extension/package.json.orig +6 -6
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/celltags-extension/package.json.orig +5 -5
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/codemirror-extension/package.json.orig +8 -8
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/completer-extension/package.json.orig +7 -7
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/package.json.orig +13 -13
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/csvviewer-extension/package.json.orig +10 -10
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/debugger-extension/package.json.orig +17 -17
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/docmanager-extension/package.json.orig +12 -12
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/documentsearch-extension/package.json.orig +6 -6
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/extensionmanager-extension/package.json.orig +7 -7
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/package.json.orig +13 -13
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/fileeditor-extension/package.json.orig +23 -23
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/package.json.orig +8 -11
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/htmlviewer-extension/package.json.orig +9 -9
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/hub-extension/package.json.orig +6 -6
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/imageviewer-extension/package.json.orig +6 -6
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/package.json.orig +9 -9
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/launcher-extension/package.json.orig +7 -7
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/logconsole-extension/package.json.orig +10 -10
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/lsp-extension/package.json.orig +8 -8
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/mainmenu-extension/package.json.orig +11 -11
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/markdownviewer-extension/package.json.orig +9 -9
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/mathjax-extension/package.json.orig +3 -3
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/metadataform-extension/package.json.orig +7 -7
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/package.json.orig +30 -30
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/running-extension/package.json.orig +12 -12
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/settingeditor-extension/package.json.orig +11 -11
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/shortcuts-extension/package.json.orig +6 -6
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/statusbar-extension/package.json.orig +6 -6
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/terminal-extension/package.json.orig +11 -11
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/toc-extension/package.json.orig +6 -6
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/package.json.orig +11 -11
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/translation-extension/package.json.orig +6 -6
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/workspaces-extension/package.json.orig +12 -12
- jupyterlab/static/1838.839690ff17ec3c532f0a.js → jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/1838.9bf831bfb74f78497b59.js +1 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/1909.7487a09fefbe7f9eabb6.js → jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/1909.be26e8d7644d4993c6aa.js +2 -2
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/2211.3123543dcc217549bbb0.js → jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/2211.027bd80515301c787fe0.js +1 -1
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/227.78c61729cb21799c0452.js +2 -0
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/2462.90740e3b1fddd10acc1a.js → jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/2462.01ca4ff30eb4234641f9.js +1 -1
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/2880.8483d51b11998bfe8e4b.js +1 -0
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/3282.22e78350d54fcaf3c6c8.js +7 -0
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/4010.ceaba4c0034c0f4daf34.js → jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/4010.830bad07f9e50a12866c.js +1 -1
- jupyterlab/static/5289.30ae4288ff93aff43a23.js → jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/5289.f11a5ddad5575f0663fb.js +1 -1
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/5987.0b8fc9e61cc5bb1d035b.js +1 -0
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/6170.534f97d39074ab915191.js +1 -0
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/6180.45663caa5943eb3356f0.js +1 -0
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/8820.6b625052509edd223505.js → jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/6439.1723c0b3882bf535486e.js +1 -1
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/6733.8d9d506485cd873c82a3.js +2 -0
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/6896.9a90c3217d8d3da90788.js → jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/6896.af1d649e0efae70b7b1a.js +1 -1
- jupyterlab/static/6986.440497af0277a8043b7a.js → jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/6986.a2b460afbc0594f06bb9.js +1 -1
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/8020.260d585ebb22b2a2508f.js +1 -0
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/8368.d4b9fd61ecaa847b1f19.js +1 -0
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/8778.a3883f9acac5a903d6be.js +1 -0
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/8820.e60b512def8b8a9953d9.js +1 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/build_log.json +99 -99
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/index.html +1 -1
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/index.out.js +57 -5
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/jlab_core.fe469fdcf594e81de1e4.js +1 -0
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/main.4b5c8dc62459959f1ba7.js +1 -0
- jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/package.json +360 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/third-party-licenses.json +105 -117
- {jupyterlab-4.4.0b0.dist-info → jupyterlab-4.4.0b2.dist-info}/METADATA +3 -3
- {jupyterlab-4.4.0b0.dist-info → jupyterlab-4.4.0b2.dist-info}/RECORD +493 -494
- {jupyterlab-4.4.0b0.dist-info → jupyterlab-4.4.0b2.dist-info}/licenses/LICENSE +1 -1
- jupyterlab/schemas/@jupyterlab/apputils-extension/running-sessions-status.json +0 -14
- jupyterlab/static/227.202b3bcb509bbfb4e52d.js +0 -2
- jupyterlab/static/3282.81fc10ff22608a9b5e5f.js +0 -8
- jupyterlab/static/3282.81fc10ff22608a9b5e5f.js.LICENSE.txt +0 -1
- jupyterlab/static/499.66250ea1f8b762c490de.js +0 -1
- jupyterlab/static/594.797ce11a3351663683d8.js +0 -1
- jupyterlab/static/5987.7e967df5417044d337a4.js +0 -1
- jupyterlab/static/6170.65d899f43342f1e34bf1.js +0 -1
- jupyterlab/static/6180.5cb938dfb09ba4774e62.js +0 -1
- jupyterlab/static/6439.60703ff72dd50ebeb850.js +0 -1
- jupyterlab/static/6733.3bc823f3988e9395b4bc.js +0 -2
- jupyterlab/static/8368.c75a4b32ae45ec88465d.js +0 -1
- jupyterlab/static/8778.3f97d9d872573f0ccd2f.js +0 -1
- jupyterlab/static/jlab_core.d9ff7dfa5fe4ca4acea6.js +0 -1
- jupyterlab/static/main.f4a4e580e8ab3d4a0db2.js +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/running-sessions-status.json +0 -14
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/227.202b3bcb509bbfb4e52d.js +0 -2
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/3282.81fc10ff22608a9b5e5f.js +0 -8
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/3282.81fc10ff22608a9b5e5f.js.LICENSE.txt +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/499.66250ea1f8b762c490de.js +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/594.797ce11a3351663683d8.js +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/5987.7e967df5417044d337a4.js +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/6170.65d899f43342f1e34bf1.js +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/6180.5cb938dfb09ba4774e62.js +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/6439.60703ff72dd50ebeb850.js +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/6733.3bc823f3988e9395b4bc.js +0 -2
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/8368.c75a4b32ae45ec88465d.js +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/8778.3f97d9d872573f0ccd2f.js +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/jlab_core.d9ff7dfa5fe4ca4acea6.js +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/main.f4a4e580e8ab3d4a0db2.js +0 -1
- jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/package.json +0 -360
- /jupyterlab/static/{1909.7487a09fefbe7f9eabb6.js.LICENSE.txt → 1909.be26e8d7644d4993c6aa.js.LICENSE.txt} +0 -0
- /jupyterlab/static/{227.202b3bcb509bbfb4e52d.js.LICENSE.txt → 227.78c61729cb21799c0452.js.LICENSE.txt} +0 -0
- /jupyterlab/static/{6733.3bc823f3988e9395b4bc.js.LICENSE.txt → 6733.8d9d506485cd873c82a3.js.LICENSE.txt} +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/etc/jupyter/jupyter_notebook_config.d/jupyterlab.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/etc/jupyter/jupyter_server_config.d/jupyterlab.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/applications/jupyterlab.desktop +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/icons/hicolor/scalable/apps/jupyterlab.svg +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/commands.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/property-inspector.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/shell.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/top-bar.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/notification.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/palette.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/print.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/sanitizer.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/sessionDialogs.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/themes.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/utilityCommands.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/cell-toolbar-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/celltags-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/codemirror-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/completer-extension/inline-completer.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/completer-extension/manager.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/completer.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/foreign.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/tracker.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/csvviewer-extension/csv.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/csvviewer-extension/tsv.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/debugger-extension/main.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/docmanager-extension/download.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/docmanager-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/documentsearch-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/extensionmanager-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/browser.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/download.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/open-browser-tab.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/open-with.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/widget.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/fileeditor-extension/completer.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/fileeditor-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/about.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/jupyter-forum.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/launch-classic.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/htmlviewer-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/hub-extension/menu.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/imageviewer-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/consoles.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/inspector.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/notebooks.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/launcher-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/logconsole-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/lsp-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/mainmenu-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/markdownviewer-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/mathjax-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/metadataform-extension/metadataforms.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/completer.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/export.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/panel.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tools.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/running-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/settingeditor-extension/form-ui.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/settingeditor-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/shortcuts-extension/shortcuts.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/statusbar-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/terminal-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/toc-extension/registry.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/consoles.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/files.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/notebooks.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/translation-extension/plugin.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/workspaces-extension/indicator.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/workspaces-extension/menu.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/schemas/@jupyterlab/workspaces-extension/sidebar.json +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/100.1d14ca44a3cc8849349f.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1026.45db0bbd7531b109234b.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1039.3fe94e87219c0ed159d3.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1096.dd4c563e0483cbbeb9c9.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1134.e84383a5d0dcf36a701f.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1189.c1482e88f0e949753db6.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1194.9c8cbdcf3165d6a2adfc.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1208.4b9ab7b231d39ebdbc3f.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1219.b5630aa3a46050fddc27.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1268.e75d8a6dd557ac8957ca.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1423.89480794cff0f407b564.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1436.2c11d9dee0ad6f49e968.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1445.a0e099c27d073217031a.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1449.7026e8748d2a77e15d5b.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1491.010c623dd546db976e95.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1495.13603dd823bbf5eb08b3.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1527.4b16fbd7a7ee840c4261.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1673.b0ee25168543434bdbca.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1737.a5fc97075f693ec36fe6.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1832.b1ede2fe899bdec88938.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1834.7445ad0c82371ac40737.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1887.56f83f163a18c61efb16.js +0 -0
- /jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/1909.7487a09fefbe7f9eabb6.js.LICENSE.txt → /jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/1909.be26e8d7644d4993c6aa.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1954.f1c519cb1415c7da3e8c.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1960.f8d8ef8a91360e60f0b9.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1962.6a7da74e809b70d5200d.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1969.86e3168e52802569d650.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1986.26029e99ef54a5652df8.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1991.84fc123d7cfe8ae2948e.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/1cb1c39ea642f26a4dfe.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2173.b0405ab2204314f22450.js +0 -0
- /jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/227.202b3bcb509bbfb4e52d.js.LICENSE.txt → /jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/227.78c61729cb21799c0452.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2280.6614699f54522fffbc00.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/232.5419cbec68e3fd0cf431.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/232.5419cbec68e3fd0cf431.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2325.07d5917569a10d687a08.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2353.ab70488f07a7c0a7a3fd.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2410.2fd90b94558fa4da549b.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/246.326a6482593e8a7bcd58.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2467.4227742ac4b60289f222.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/247.84259ab142dd8c151fc2.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2574.7d463f2a193d49883bdc.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2576.b98b7b23adeec4cb6932.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2590.99e505d19b964439aa31.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2633.ea053b40991eb5adbc69.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2641.e77441e7a3e0d12834c5.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/265.6f9e37c0b72db64203b1.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2658.d1cae1b08b068d864368.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/26683bf201fb258a2237.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2681.a47f40e38ecd31ccd687.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2707.61050e600b0aa9624127.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2729.cafaf0caf2c0c83ac9fe.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2794.05495c139ed000b57598.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2823.0b6015b5e03c08281f41.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/284.011fb4ad952aa9ae7556.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/294.06274dddaaf7a6791144.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2957.bc5eb9549a0b15c44916.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/2959.b24c9f67d639376f5ead.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3091.efc4a32ce0ae059e1cc1.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/30e889b58cbc51adfbb0.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3111.33574d9124842f355bce.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3112.0757b31e24c5334fda73.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/321.0fb994fd384a54491584.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3257.30af681f0c294efb65f7.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3257.30af681f0c294efb65f7.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/32792104b5ef69eded90.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3293.45e37a0c8e23d360f5c6.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3303.b5596c0715d2d58332fb.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3372.8eeafd96de9a7a205f40.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/339.62fb1e5a084681d24bfa.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/355254db9ca10a09a3b5.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3616.a4271ffcf2ac3b4c2338.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/36e0d72d8a7afc696a3e.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3709.e33bc30c83272aa85628.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/373c04fd2418f5c77eea.eot +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3763.36efc2b6c194745863e4.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3780.c9294dc98ae926717741.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3799.eaa0438bc5c41bad0516.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3824.5e23be1e37fce5b7c6b3.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3832.c6026c483bb46cc8e599.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3903.cc595f73c608b08a3a1f.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3927.89a6851a5a931d2b0270.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3974.79f68bca9a02c92dab5e.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3991.678edf189fe92a216c70.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3bc6ecaae7ecf6f8d7f8.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3de784d07b9fa8f104c1.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/3f6d3488cf65374f6f67.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4001.80ab3ef5300d7ce2d1fe.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4053.4945facc348478fd59f4.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4068.9cc41f46f729f2c4369b.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4076.b4d803d8bf1bd6c97854.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4090.bd2ff9e2e0260755b494.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4266.155b468271987c81d948.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4296.721da424585874d0789e.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4323.b2bd8a329a81d30ed039.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4325.9320a2934ee3f39284c9.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4350.8c8a0e7a3ffe036494e1.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4353.595ce0e0b174011528d6.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4364.f8bdb644f56208f6ebbd.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4372.645626a2452c190dbb22.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4372.645626a2452c190dbb22.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4408.f24dd0edf35e08548967.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4449.3dd4ab90979d0a9046e2.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4462.5b7c89923560703ffc61.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4484.0c7c43754e97c96f0f89.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4486.8d2f41ae787607b7bf31.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4528.43328125d98d6cfdfa99.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4611.bd2b768223b0cd570834.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4616.04cfbd55593c51921cc7.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4617.09dfe9ef229a3503ed92.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4728.f59e4bd4b29409da82bc.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4728.f59e4bd4b29409da82bc.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4735.7731d551ca68bcb58e9f.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4750.ca16de8a377d78fa4894.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4797.3740ef47b224a11a7fab.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/481e39042508ae313a60.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4838.8db4c61349bfba200547.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4855.29e8dc6982ba4873487d.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4878.f7557c5c99a54b40c49b.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/492.5f186062d2dcdf79c86c.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4928.6cb408e4def87534970d.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4950.e9b784b07c6a6835db7b.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4958.97b2f8fcf192239b1b26.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4981.eed4ddb90566e90e3df4.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/4982.c864dc2dcc58e81c090a.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5085.a38923f36b551620798a.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5090.404be96d8a6eae1e719a.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5090.404be96d8a6eae1e719a.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5211.5b71830476810a6188e4.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5224.8a6bbc774d20be66fdfb.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5232.c7cdbc40a194e6b36521.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5244.eefac84704ad30f00af3.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5317.f4bba2e3d0f4fdd088f7.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5318.d5df5c275e925c22d780.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5338.38c32bdfb0695f9b501f.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5489.7fab44eac7538297b164.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5492.44728a640c37a4b4aa0c.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5521.cc7da8760b98f2dd2c18.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5551.6e2afa1292957f232cf7.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5566.c76ea61eb723ee84e2cf.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5606.e03dfa10c124a03f36ba.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5829.0e46d479b4ade4783661.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5847.930208c25e45ecf30657.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5862.be1ec453e8db6844c62d.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5863.1d294c694c9368b6346d.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5877.72ab5a29e95ce21981e4.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5929.d561797f8259994ecdd8.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5942.05cbcd55c5f45ff7db43.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/5cda41563a095bd70c78.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6003.0e631d8bc60aebfa5484.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6060.52dca011e9f2f279fc5e.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6095.6e79e3bad86e054aa8c8.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6145.c422868290460078c013.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6166.2bc9ac8e2156c0701a52.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6275.e99f9312900c481b467d.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6294.b3cb5e16527b9d09b4a2.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6372.edc0712a4be855493530.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6412.ebdf8da40f1ba8272df9.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6451.055355bbfa228d4a2231.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6460.d9aaa1e48da295c6035d.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6492.804d51a693edf6978ef4.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6540.51c00e890179a4832552.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6540.51c00e890179a4832552.js.LICENSE.txt +0 -0
- /jupyterlab-4.4.0b0.data/data/share/jupyter/lab/static/6733.3bc823f3988e9395b4bc.js.LICENSE.txt → /jupyterlab-4.4.0b2.data/data/share/jupyter/lab/static/6733.8d9d506485cd873c82a3.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6767.4b82d96c237ca7e31bc6.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6831.1df8fa4cabb5b1c19803.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6843.dabcc3c9658bc6ded6d1.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6874.bb2f7fbc6ce56eecc800.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6885.5fc0d5e8bf322cb22354.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6941.465bebbd3d8a024f5f15.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/6993.c93f5a810fcf441cbb6f.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7086.2b1722a86661364a4ec4.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7136.b312751fbb25b73f5e71.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/721921bab0d001ebff02.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7250.b88d0a5e237ff5ff1aad.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7260.b47dcaccbe7991104e8a.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7269.962f078e97afc4f68e79.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/72bc573386dd1d48c5bb.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/731.82a7b980b5b7f4b7a14f.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7318.7cc6b4b0b3151b205ecb.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7425.f1c25f6c8aaec77e8635.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7445.7c793c8e1720f8ec4f85.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7575.2e3e32236d5667bba43f.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7587.3112240b6b82407b0f16.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7694.1cbff84dccb512476b7c.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7756.93d0ab41829355a147ab.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7769.d39df7673ee2660a9ac4.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7803.0c8929610218552319bf.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7856.dd9523e57bed80f1f694.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7879.2e9f3ab51e7632081b1e.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7881.c5a234ce171f347c94e2.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7990.01eaa552261b6e12a74a.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/7990.01eaa552261b6e12a74a.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/79d088064beb3826054f.eot +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8103.00fa0c157eb92e5cf3ba.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8120.52119377c0a8f6a400b3.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8159.d6f283e98f46a953f575.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8217.801fbb0b549a74238760.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8232.76805a0a87d0f6bb62ad.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8313.6e63b9811aee7e4b2568.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8326.9dda93079a9e4f1b9be6.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/84.fe0a55d7756c37585fb4.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8418.42e29778d4b49fb54e8e.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8493.380c0da7565838ef069a.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8606.bc1b0136e61d173913cd.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/867.e814bf26fbfc77fc4f16.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/870673df72e70f87c91a.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/874.be636e15937f9ef70121.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8753.56da17175b663d61f9d3.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8779.6eebdb56785e3d38a457.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8786.1df994b93bdc32f7c6b0.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8786.1df994b93bdc32f7c6b0.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8804.c99896b2790928fd028e.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8816.d7ec52fb31e9c6749593.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8830.d5bb102ed8737ffe38cb.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/88b98cad3688915e50da.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/89.933673451ca4a51053cb.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8ea8791754915a898a31.woff2 +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/8ea8dbb1b02e6f730f55.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9023.2ff687d7ff50df3719fc.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9046.99c477ea375dcbb8c7ca.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9085.5a959b5878e7afd8a878.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9085.5a959b5878e7afd8a878.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9123.501219cd782693d6539f.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9137.179a3c47465e7fb8f067.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9296.53192f1301a3b8a06238.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9311.8665d8c6e7a33b23b427.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9329.2c313c649fae987158c7.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9331.4aebc7e0a8a13429e89e.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9400.90fd1d2212781c80b587.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9474.01b4e1d1e3376f4a5919.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9517.7056cafdf1da3a136d45.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9604.327a06fcbad2d570bf4e.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/961.29c067b15a524e556eed.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/961.29c067b15a524e556eed.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9652.a8d2e5854bcae4d40041.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9674eb1bd55047179038.svg +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9746.c7e86b432363dfd28caa.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9834b82ad26e2a37583d.woff2 +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9892.6d289e7baed8c64d88e2.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/9892.6d289e7baed8c64d88e2.js.LICENSE.txt +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/a009bea404f7a500ded4.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/a3b9817780214caf01e8.svg +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/af04542b29eaac04550a.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/af6397503fcefbd61397.ttf +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/af96f67d7accf5fd2a4a.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/b418136e3b384baaadec.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/be0a084962d8066884f7.svg +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/bootstrap.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/c49810b53ecc0d87d802.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/c56da8d69f1a0208b8e0.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/cb9e9e693192413cde2b.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/cda59d6efffa685830fd.ttf +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/e4299464e7b012968eed.eot +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/e42a88444448ac3d6054.woff2 +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/e8711bbb871afd8e9dea.ttf +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/f9217f66874b0c01cd8c.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/fc6ddf5df402b263cfb1.woff +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/static/style.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-dark-extension/index.css +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-dark-extension/index.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-dark-high-contrast-extension/index.css +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-dark-high-contrast-extension/index.js +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-light-extension/index.css +0 -0
- {jupyterlab-4.4.0b0.data → jupyterlab-4.4.0b2.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-light-extension/index.js +0 -0
- {jupyterlab-4.4.0b0.dist-info → jupyterlab-4.4.0b2.dist-info}/WHEEL +0 -0
- {jupyterlab-4.4.0b0.dist-info → jupyterlab-4.4.0b2.dist-info}/entry_points.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[4010,5606],{34496:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});var r=n(75472);var i=n(34050);var s=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}};var a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr);const n=(0,i.WQ)((0,i.tG)({shared:t}),r.e5,a);t.ServiceRegistry.register(n);return{shared:t,Info:n}}(0,r.K2)(o,"createInfoServices")},95304:(e,t,n)=>{"use strict";n.d(t,{f:()=>c});var r=n(75472);var i=n(34050);var s=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}};var a=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(e,t,n){if(e.name!=="PIE_SECTION_LABEL"){return void 0}return t.replace(/"/g,"").trim()}};var o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new a),"ValueConverter")}};function c(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr);const n=(0,i.WQ)((0,i.tG)({shared:t}),r.KX,o);t.ServiceRegistry.register(n);return{shared:t,Pie:n}}(0,r.K2)(c,"createPieServices")},7112:(e,t,n)=>{"use strict";n.d(t,{$:()=>o});var r=n(75472);var i=n(34050);var s=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}};var a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr);const n=(0,i.WQ)((0,i.tG)({shared:t}),r.AM,a);t.ServiceRegistry.register(n);return{shared:t,Packet:n}}(0,r.K2)(o,"createPacketServices")},75753:(e,t,n)=>{"use strict";n.d(t,{S:()=>c});var r=n(75472);var i=n(34050);var s=class extends r.mR{static{(0,r.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}};var a=class extends r.dg{static{(0,r.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,n){if(e.name==="ARCH_ICON"){return t.replace(/[()]/g,"").trim()}else if(e.name==="ARCH_TEXT_ICON"){return t.replace(/["()]/g,"")}else if(e.name==="ARCH_TITLE"){return t.replace(/[[\]]/g,"").trim()}return void 0}};var o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new a),"ValueConverter")}};function c(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr);const n=(0,i.WQ)((0,i.tG)({shared:t}),r.jE,o);t.ServiceRegistry.register(n);return{shared:t,Architecture:n}}(0,r.K2)(c,"createArchitectureServices")},98996:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var r=n(75472);var i=n(34050);var s=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}};var a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr);const n=(0,i.WQ)((0,i.tG)({shared:t}),r.eZ,a);t.ServiceRegistry.register(n);return{shared:t,GitGraph:n}}(0,r.K2)(o,"createGitGraphServices")},75472:(e,t,n)=>{"use strict";n.d(t,{AM:()=>Q,K2:()=>s,KX:()=>J,Tm:()=>ae,dg:()=>se,e5:()=>X,eZ:()=>ee,jE:()=>Z,mR:()=>oe,sr:()=>Y});var r=n(34050);var i=Object.defineProperty;var s=(e,t)=>i(e,"name",{value:t,configurable:true});var a="Statement";var o="Architecture";function c(e){return _.isInstance(e,o)}s(c,"isArchitecture");var u="Branch";function l(e){return _.isInstance(e,u)}s(l,"isBranch");var f="Checkout";var d="CherryPicking";var h="Commit";function p(e){return _.isInstance(e,h)}s(p,"isCommit");var m="Common";function g(e){return _.isInstance(e,m)}s(g,"isCommon");var y="GitGraph";function A(e){return _.isInstance(e,y)}s(A,"isGitGraph");var T="Info";function v(e){return _.isInstance(e,T)}s(v,"isInfo");var E="Merge";function R(e){return _.isInstance(e,E)}s(R,"isMerge");var k="Packet";function x(e){return _.isInstance(e,k)}s(x,"isPacket");var I="PacketBlock";function S(e){return _.isInstance(e,I)}s(S,"isPacketBlock");var w="Pie";function N(e){return _.isInstance(e,w)}s(N,"isPie");var C="PieSection";function $(e){return _.isInstance(e,C)}s($,"isPieSection");var L="Direction";var b=class extends r.kD{static{s(this,"MermaidAstReflection")}getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(e,t){switch(e){case u:case f:case d:case h:case E:{return this.isSubtype(a,t)}case L:{return this.isSubtype(y,t)}default:{return false}}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){default:{throw new Error(`${t} is not a valid reference id.`)}}}getTypeMetaData(e){switch(e){case"Architecture":{return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]}}case"Branch":{return{name:"Branch",properties:[{name:"name"},{name:"order"}]}}case"Checkout":{return{name:"Checkout",properties:[{name:"branch"}]}}case"CherryPicking":{return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]}}case"Commit":{return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]}}case"Common":{return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]}}case"Edge":{return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:false},{name:"lhsId"},{name:"lhsInto",defaultValue:false},{name:"rhsDir"},{name:"rhsGroup",defaultValue:false},{name:"rhsId"},{name:"rhsInto",defaultValue:false},{name:"title"}]}}case"GitGraph":{return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]}}case"Group":{return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]}}case"Info":{return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]}}case"Junction":{return{name:"Junction",properties:[{name:"id"},{name:"in"}]}}case"Merge":{return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]}}case"Packet":{return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]}}case"PacketBlock":{return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]}}case"Pie":{return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:false},{name:"title"}]}}case"PieSection":{return{name:"PieSection",properties:[{name:"label"},{name:"value"}]}}case"Service":{return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]}}case"Direction":{return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]}}default:{return{name:e,properties:[]}}}}};var _=new b;var O;var P=s((()=>O??(O=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"InfoGrammar");var M;var D=s((()=>M??(M=(0,r.y0)(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`))),"PacketGrammar");var U;var F=s((()=>U??(U=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PieGrammar");var G;var B=s((()=>G??(G=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"ArchitectureGrammar");var K;var j=s((()=>K??(K=(0,r.y0)(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`))),"GitGraphGrammar");var V={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false};var W={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false};var H={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false};var z={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false};var q={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false};var Y={AstReflection:s((()=>new b),"AstReflection")};var X={Grammar:s((()=>P()),"Grammar"),LanguageMetaData:s((()=>V),"LanguageMetaData"),parser:{}};var Q={Grammar:s((()=>D()),"Grammar"),LanguageMetaData:s((()=>W),"LanguageMetaData"),parser:{}};var J={Grammar:s((()=>F()),"Grammar"),LanguageMetaData:s((()=>H),"LanguageMetaData"),parser:{}};var Z={Grammar:s((()=>B()),"Grammar"),LanguageMetaData:s((()=>z),"LanguageMetaData"),parser:{}};var ee={Grammar:s((()=>j()),"Grammar"),LanguageMetaData:s((()=>q),"LanguageMetaData"),parser:{}};var te=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/;var ne=/accTitle[\t ]*:([^\n\r]*)/;var re=/title([\t ][^\n\r]*|)/;var ie={ACC_DESCR:te,ACC_TITLE:ne,TITLE:re};var se=class extends r.dM{static{s(this,"AbstractMermaidValueConverter")}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);if(r===void 0){r=this.runCustomConverter(e,t,n)}if(r===void 0){return super.runConverter(e,t,n)}return r}runCommonConverter(e,t,n){const r=ie[e.name];if(r===void 0){return void 0}const i=r.exec(t);if(i===null){return void 0}if(i[1]!==void 0){return i[1].trim().replace(/[\t ]{2,}/gm," ")}if(i[2]!==void 0){return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n")}return void 0}};var ae=class extends se{static{s(this,"CommonValueConverter")}runCustomConverter(e,t,n){return void 0}};var oe=class extends r.QU{static{s(this,"AbstractMermaidTokenBuilder")}constructor(e){super();this.keywords=new Set(e)}buildKeywordTokens(e,t,n){const r=super.buildKeywordTokens(e,t,n);r.forEach((e=>{if(this.keywords.has(e.name)&&e.PATTERN!==void 0){e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))")}}));return r}};var ce=class extends oe{static{s(this,"CommonTokenBuilder")}}},24010:(e,t,n)=>{"use strict";n.d(t,{qg:()=>f});var r=n(98996);var i=n(34496);var s=n(7112);var a=n(95304);var o=n(75753);var c=n(75472);var u={};var l={info:(0,c.K2)((async()=>{const{createInfoServices:e}=await n.e(4617).then(n.bind(n,4617));const t=e().Info.parser.LangiumParser;u.info=t}),"info"),packet:(0,c.K2)((async()=>{const{createPacketServices:e}=await n.e(5863).then(n.bind(n,75863));const t=e().Packet.parser.LangiumParser;u.packet=t}),"packet"),pie:(0,c.K2)((async()=>{const{createPieServices:e}=await n.e(1134).then(n.bind(n,41134));const t=e().Pie.parser.LangiumParser;u.pie=t}),"pie"),architecture:(0,c.K2)((async()=>{const{createArchitectureServices:e}=await n.e(3091).then(n.bind(n,23091));const t=e().Architecture.parser.LangiumParser;u.architecture=t}),"architecture"),gitGraph:(0,c.K2)((async()=>{const{createGitGraphServices:e}=await n.e(8120).then(n.bind(n,18120));const t=e().GitGraph.parser.LangiumParser;u.gitGraph=t}),"gitGraph")};async function f(e,t){const n=l[e];if(!n){throw new Error(`Unknown diagram type: ${e}`)}if(!u[e]){await n()}const r=u[e];const i=r.parse(t);if(i.lexerErrors.length>0||i.parserErrors.length>0){throw new d(i)}return i.value}(0,c.K2)(f,"parse");var d=class extends Error{constructor(e){const t=e.lexerErrors.map((e=>e.message)).join("\n");const n=e.parserErrors.map((e=>e.message)).join("\n");super(`Parsing failed: ${t} ${n}`);this.result=e}static{(0,c.K2)(this,"MermaidParseError")}}},34050:(e,t,n)=>{"use strict";n.d(t,{kD:()=>o,QU:()=>Ch,dM:()=>$h,DD:()=>Om,tG:()=>km,uM:()=>xm,WQ:()=>Sm,y0:()=>Um});function r(e){return typeof e==="object"&&e!==null&&typeof e.$type==="string"}function i(e){return typeof e==="object"&&e!==null&&typeof e.$refText==="string"}function s(e){return typeof e==="object"&&e!==null&&typeof e.name==="string"&&typeof e.type==="string"&&typeof e.path==="string"}function a(e){return typeof e==="object"&&e!==null&&r(e.container)&&i(e.reference)&&typeof e.message==="string"}class o{constructor(){this.subtypes={};this.allSubtypes={}}isInstance(e,t){return r(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t){return true}let n=this.subtypes[e];if(!n){n=this.subtypes[e]={}}const r=n[t];if(r!==undefined){return r}else{const r=this.computeIsSubtype(e,t);n[t]=r;return r}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t){return t}else{const t=this.getAllTypes();const n=[];for(const r of t){if(this.isSubtype(r,e)){n.push(r)}}this.allSubtypes[e]=n;return n}}}function c(e){return typeof e==="object"&&e!==null&&Array.isArray(e.content)}function u(e){return typeof e==="object"&&e!==null&&typeof e.tokenType==="object"}function l(e){return c(e)&&typeof e.fullText==="string"}class f{constructor(e,t){this.startFn=e;this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0;let n=e.next();while(!n.done){t++;n=e.next()}return t}toArray(){const e=[];const t=this.iterator();let n;do{n=t.next();if(n.value!==undefined){e.push(n.value)}}while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){const n=this.map((n=>[e?e(n):n,t?t(n):n]));return new Map(n)}toString(){return this.join()}concat(e){const t=e[Symbol.iterator]();return new f((()=>({first:this.startFn(),firstDone:false})),(e=>{let n;if(!e.firstDone){do{n=this.nextFn(e.first);if(!n.done){return n}}while(!n.done);e.firstDone=true}do{n=t.next();if(!n.done){return n}}while(!n.done);return m}))}join(e=","){const t=this.iterator();let n="";let r;let i=false;do{r=t.next();if(!r.done){if(i){n+=e}n+=d(r.value)}i=true}while(!r.done);return n}indexOf(e,t=0){const n=this.iterator();let r=0;let i=n.next();while(!i.done){if(r>=t&&i.value===e){return r}i=n.next();r++}return-1}every(e){const t=this.iterator();let n=t.next();while(!n.done){if(!e(n.value)){return false}n=t.next()}return true}some(e){const t=this.iterator();let n=t.next();while(!n.done){if(e(n.value)){return true}n=t.next()}return false}forEach(e){const t=this.iterator();let n=0;let r=t.next();while(!r.done){e(r.value,n);r=t.next();n++}}map(e){return new f(this.startFn,(t=>{const{done:n,value:r}=this.nextFn(t);if(n){return m}else{return{done:false,value:e(r)}}}))}filter(e){return new f(this.startFn,(t=>{let n;do{n=this.nextFn(t);if(!n.done&&e(n.value)){return n}}while(!n.done);return m}))}nonNullable(){return this.filter((e=>e!==undefined&&e!==null))}reduce(e,t){const n=this.iterator();let r=t;let i=n.next();while(!i.done){if(r===undefined){r=i.value}else{r=e(r,i.value)}i=n.next()}return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){const r=e.next();if(r.done){return n}const i=this.recursiveReduce(e,t,n);if(i===undefined){return r.value}return t(i,r.value)}find(e){const t=this.iterator();let n=t.next();while(!n.done){if(e(n.value)){return n.value}n=t.next()}return undefined}findIndex(e){const t=this.iterator();let n=0;let r=t.next();while(!r.done){if(e(r.value)){return n}r=t.next();n++}return-1}includes(e){const t=this.iterator();let n=t.next();while(!n.done){if(n.value===e){return true}n=t.next()}return false}flatMap(e){return new f((()=>({this:this.startFn()})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(e.done){t.iterator=undefined}else{return e}}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(h(n)){t.iterator=n[Symbol.iterator]()}else{return{done:false,value:n}}}}while(t.iterator);return m}))}flat(e){if(e===undefined){e=1}if(e<=0){return this}const t=e>1?this.flat(e-1):this;return new f((()=>({this:t.startFn()})),(e=>{do{if(e.iterator){const t=e.iterator.next();if(t.done){e.iterator=undefined}else{return t}}const{done:n,value:r}=t.nextFn(e.this);if(!n){if(h(r)){e.iterator=r[Symbol.iterator]()}else{return{done:false,value:r}}}}while(e.iterator);return m}))}head(){const e=this.iterator();const t=e.next();if(t.done){return undefined}return t.value}tail(e=1){return new f((()=>{const t=this.startFn();for(let n=0;n<e;n++){const e=this.nextFn(t);if(e.done){return t}}return t}),this.nextFn)}limit(e){return new f((()=>({size:0,state:this.startFn()})),(t=>{t.size++;if(t.size>e){return m}return this.nextFn(t.state)}))}distinct(e){const t=new Set;return this.filter((n=>{const r=e?e(n):n;if(t.has(r)){return false}else{t.add(r);return true}}))}exclude(e,t){const n=new Set;for(const r of e){const e=t?t(r):r;n.add(e)}return this.filter((e=>{const r=t?t(e):e;return!n.has(r)}))}}function d(e){if(typeof e==="string"){return e}if(typeof e==="undefined"){return"undefined"}if(typeof e.toString==="function"){return e.toString()}return Object.prototype.toString.call(e)}function h(e){return!!e&&typeof e[Symbol.iterator]==="function"}const p=new f((()=>undefined),(()=>m));const m=Object.freeze({done:true,value:undefined});function g(...e){if(e.length===1){const t=e[0];if(t instanceof f){return t}if(h(t)){return new f((()=>t[Symbol.iterator]()),(e=>e.next()))}if(typeof t.length==="number"){return new f((()=>({index:0})),(e=>{if(e.index<t.length){return{done:false,value:t[e.index++]}}else{return m}}))}}if(e.length>1){return new f((()=>({collIndex:0,arrIndex:0})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done){return e}t.iterator=undefined}if(t.array){if(t.arrIndex<t.array.length){return{done:false,value:t.array[t.arrIndex++]}}t.array=undefined;t.arrIndex=0}if(t.collIndex<e.length){const n=e[t.collIndex++];if(h(n)){t.iterator=n[Symbol.iterator]()}else if(n&&typeof n.length==="number"){t.array=n}}}while(t.iterator||t.array||t.collIndex<e.length);return m}))}return p}class y extends f{constructor(e,t,n){super((()=>({iterators:(n===null||n===void 0?void 0:n.includeRoot)?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:false})),(e=>{if(e.pruned){e.iterators.pop();e.pruned=false}while(e.iterators.length>0){const n=e.iterators[e.iterators.length-1];const r=n.next();if(r.done){e.iterators.pop()}else{e.iterators.push(t(r.value)[Symbol.iterator]());return r}}return m}))}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=true},[Symbol.iterator]:()=>e};return e}}var A;(function(e){function t(e){return e.reduce(((e,t)=>e+t),0)}e.sum=t;function n(e){return e.reduce(((e,t)=>e*t),0)}e.product=n;function r(e){return e.reduce(((e,t)=>Math.min(e,t)))}e.min=r;function i(e){return e.reduce(((e,t)=>Math.max(e,t)))}e.max=i})(A||(A={}));function T(e){return new y(e,(e=>{if(c(e)){return e.content}else{return[]}}),{includeRoot:true})}function v(e){return T(e).filter(isLeafCstNode)}function E(e,t){while(e.container){e=e.container;if(e===t){return true}}return false}function R(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function k(e){if(!e){return undefined}const{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}var x;(function(e){e[e["Before"]=0]="Before";e[e["After"]=1]="After";e[e["OverlapFront"]=2]="OverlapFront";e[e["OverlapBack"]=3]="OverlapBack";e[e["Inside"]=4]="Inside"})(x||(x={}));function I(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<e.start.character){return x.Before}else if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>t.end.character){return x.After}const n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character;const r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;if(n&&r){return x.Inside}else if(n){return x.OverlapBack}else{return x.OverlapFront}}function S(e,t){const n=I(e,t);return n>x.After}const w=/^[\w\p{L}]$/u;function N(e,t,n=w){if(e){if(t>0){const r=t-e.offset;const i=e.text.charAt(r);if(!n.test(i)){t--}}return L(e,t)}return undefined}function C(e,t){if(e){const n=O(e,true);if(n&&$(n,t)){return n}if(l(e)){const n=e.content.findIndex((e=>!e.hidden));for(let r=n-1;r>=0;r--){const n=e.content[r];if($(n,t)){return n}}}}return undefined}function $(e,t){return u(e)&&t.includes(e.tokenType.name)}function L(e,t){if(isLeafCstNode(e)){return e}else if(isCompositeCstNode(e)){const n=_(e,t,false);if(n){return L(n,t)}}return undefined}function b(e,t){if(isLeafCstNode(e)){return e}else if(isCompositeCstNode(e)){const n=_(e,t,true);if(n){return b(n,t)}}return undefined}function _(e,t,n){let r=0;let i=e.content.length-1;let s=undefined;while(r<=i){const a=Math.floor((r+i)/2);const o=e.content[a];if(o.offset<=t&&o.end>t){return o}if(o.end<=t){s=n?o:undefined;r=a+1}else{i=a-1}}return s}function O(e,t=true){while(e.container){const n=e.container;let r=n.content.indexOf(e);while(r>0){r--;const e=n.content[r];if(t||!e.hidden){return e}}e=n}return undefined}function P(e,t=true){while(e.container){const n=e.container;let r=n.content.indexOf(e);const i=n.content.length-1;while(r<i){r++;const e=n.content[r];if(t||!e.hidden){return e}}e=n}return undefined}function M(e){if(e.range.start.character===0){return e}const t=e.range.start.line;let n=e;let r;while(e.container){const i=e.container;const s=r!==null&&r!==void 0?r:i.content.indexOf(e);if(s===0){e=i;r=undefined}else{r=s-1;e=i.content[r]}if(e.range.start.line!==t){break}n=e}return n}function D(e,t){const n=U(e,t);if(!n){return[]}return n.parent.content.slice(n.a+1,n.b)}function U(e,t){const n=F(e);const r=F(t);let i;for(let s=0;s<n.length&&s<r.length;s++){const e=n[s];const t=r[s];if(e.parent===t.parent){i={parent:e.parent,a:e.index,b:t.index}}else{break}}return i}function F(e){const t=[];while(e.container){const n=e.container;const r=n.content.indexOf(e);t.push({parent:n,index:r});e=n}return t.reverse()}class G extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function B(e){throw new Error("Error! The input value was not handled.")}const K={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/};const j="AbstractRule";function V(e){return $t.isInstance(e,j)}const W="AbstractType";function H(e){return $t.isInstance(e,W)}const z="Condition";function q(e){return $t.isInstance(e,z)}function Y(e){return X(e)||e==="current"||e==="entry"||e==="extends"||e==="false"||e==="fragment"||e==="grammar"||e==="hidden"||e==="import"||e==="interface"||e==="returns"||e==="terminal"||e==="true"||e==="type"||e==="infer"||e==="infers"||e==="with"||typeof e==="string"&&/\^?[_a-zA-Z][\w_]*/.test(e)}function X(e){return e==="string"||e==="number"||e==="boolean"||e==="Date"||e==="bigint"}const Q="TypeDefinition";function J(e){return $t.isInstance(e,Q)}const Z="ValueLiteral";function ee(e){return $t.isInstance(e,Z)}const te="AbstractElement";function ne(e){return $t.isInstance(e,te)}const re="ArrayLiteral";function ie(e){return $t.isInstance(e,re)}const se="ArrayType";function ae(e){return $t.isInstance(e,se)}const oe="BooleanLiteral";function ce(e){return $t.isInstance(e,oe)}const ue="Conjunction";function le(e){return $t.isInstance(e,ue)}const fe="Disjunction";function de(e){return $t.isInstance(e,fe)}const he="Grammar";function pe(e){return $t.isInstance(e,he)}const me="GrammarImport";function ge(e){return $t.isInstance(e,me)}const ye="InferredType";function Ae(e){return $t.isInstance(e,ye)}const Te="Interface";function ve(e){return $t.isInstance(e,Te)}const Ee="NamedArgument";function Re(e){return $t.isInstance(e,Ee)}const ke="Negation";function xe(e){return $t.isInstance(e,ke)}const Ie="NumberLiteral";function Se(e){return $t.isInstance(e,Ie)}const we="Parameter";function Ne(e){return $t.isInstance(e,we)}const Ce="ParameterReference";function $e(e){return $t.isInstance(e,Ce)}const Le="ParserRule";function be(e){return $t.isInstance(e,Le)}const _e="ReferenceType";function Oe(e){return $t.isInstance(e,_e)}const Pe="ReturnType";function Me(e){return $t.isInstance(e,Pe)}const De="SimpleType";function Ue(e){return $t.isInstance(e,De)}const Fe="StringLiteral";function Ge(e){return $t.isInstance(e,Fe)}const Be="TerminalRule";function Ke(e){return $t.isInstance(e,Be)}const je="Type";function Ve(e){return $t.isInstance(e,je)}const We="TypeAttribute";function He(e){return $t.isInstance(e,We)}const ze="UnionType";function qe(e){return $t.isInstance(e,ze)}const Ye="Action";function Xe(e){return $t.isInstance(e,Ye)}const Qe="Alternatives";function Je(e){return $t.isInstance(e,Qe)}const Ze="Assignment";function et(e){return $t.isInstance(e,Ze)}const tt="CharacterRange";function nt(e){return $t.isInstance(e,tt)}const rt="CrossReference";function it(e){return $t.isInstance(e,rt)}const st="EndOfFile";function at(e){return $t.isInstance(e,st)}const ot="Group";function ct(e){return $t.isInstance(e,ot)}const ut="Keyword";function lt(e){return $t.isInstance(e,ut)}const ft="NegatedToken";function dt(e){return $t.isInstance(e,ft)}const ht="RegexToken";function pt(e){return $t.isInstance(e,ht)}const mt="RuleCall";function gt(e){return $t.isInstance(e,mt)}const yt="TerminalAlternatives";function At(e){return $t.isInstance(e,yt)}const Tt="TerminalGroup";function vt(e){return $t.isInstance(e,Tt)}const Et="TerminalRuleCall";function Rt(e){return $t.isInstance(e,Et)}const kt="UnorderedGroup";function xt(e){return $t.isInstance(e,kt)}const It="UntilToken";function St(e){return $t.isInstance(e,It)}const wt="Wildcard";function Nt(e){return $t.isInstance(e,wt)}class Ct extends o{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,t){switch(e){case Ye:case Qe:case Ze:case tt:case rt:case st:case ot:case ut:case ft:case ht:case mt:case yt:case Tt:case Et:case kt:case It:case wt:{return this.isSubtype(te,t)}case re:case Ie:case Fe:{return this.isSubtype(Z,t)}case se:case _e:case De:case ze:{return this.isSubtype(Q,t)}case oe:{return this.isSubtype(z,t)||this.isSubtype(Z,t)}case ue:case fe:case ke:case Ce:{return this.isSubtype(z,t)}case ye:case Te:case je:{return this.isSubtype(W,t)}case Le:{return this.isSubtype(j,t)||this.isSubtype(W,t)}case Be:{return this.isSubtype(j,t)}default:{return false}}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":{return W}case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":{return j}case"Grammar:usedGrammars":{return he}case"NamedArgument:parameter":case"ParameterReference:parameter":{return we}case"TerminalRuleCall:rule":{return Be}default:{throw new Error(`${t} is not a valid reference id.`)}}}getTypeMetaData(e){switch(e){case"AbstractElement":{return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]}}case"ArrayLiteral":{return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]}}case"ArrayType":{return{name:"ArrayType",properties:[{name:"elementType"}]}}case"BooleanLiteral":{return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:false}]}}case"Conjunction":{return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]}}case"Disjunction":{return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]}}case"Grammar":{return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:false},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:false},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]}}case"GrammarImport":{return{name:"GrammarImport",properties:[{name:"path"}]}}case"InferredType":{return{name:"InferredType",properties:[{name:"name"}]}}case"Interface":{return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]}}case"NamedArgument":{return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:false},{name:"parameter"},{name:"value"}]}}case"Negation":{return{name:"Negation",properties:[{name:"value"}]}}case"NumberLiteral":{return{name:"NumberLiteral",properties:[{name:"value"}]}}case"Parameter":{return{name:"Parameter",properties:[{name:"name"}]}}case"ParameterReference":{return{name:"ParameterReference",properties:[{name:"parameter"}]}}case"ParserRule":{return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:false},{name:"definition"},{name:"entry",defaultValue:false},{name:"fragment",defaultValue:false},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:false}]}}case"ReferenceType":{return{name:"ReferenceType",properties:[{name:"referenceType"}]}}case"ReturnType":{return{name:"ReturnType",properties:[{name:"name"}]}}case"SimpleType":{return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]}}case"StringLiteral":{return{name:"StringLiteral",properties:[{name:"value"}]}}case"TerminalRule":{return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:false},{name:"hidden",defaultValue:false},{name:"name"},{name:"type"}]}}case"Type":{return{name:"Type",properties:[{name:"name"},{name:"type"}]}}case"TypeAttribute":{return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:false},{name:"name"},{name:"type"}]}}case"UnionType":{return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]}}case"Action":{return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]}}case"Alternatives":{return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]}}case"Assignment":{return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]}}case"CharacterRange":{return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]}}case"CrossReference":{return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:false},{name:"lookahead"},{name:"terminal"},{name:"type"}]}}case"EndOfFile":{return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]}}case"Group":{return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]}}case"Keyword":{return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]}}case"NegatedToken":{return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]}}case"RegexToken":{return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]}}case"RuleCall":{return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]}}case"TerminalAlternatives":{return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]}}case"TerminalGroup":{return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]}}case"TerminalRuleCall":{return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]}}case"UnorderedGroup":{return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]}}case"UntilToken":{return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]}}case"Wildcard":{return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]}}default:{return{name:e,properties:[]}}}}}const $t=new Ct;function Lt(e){for(const[t,n]of Object.entries(e)){if(!t.startsWith("$")){if(Array.isArray(n)){n.forEach(((n,i)=>{if(r(n)){n.$container=e;n.$containerProperty=t;n.$containerIndex=i}}))}else if(r(n)){n.$container=e;n.$containerProperty=t}}}}function bt(e,t){let n=e;while(n){if(t(n)){return n}n=n.$container}return undefined}function _t(e,t){let n=e;while(n){if(t(n)){return true}n=n.$container}return false}function Ot(e){const t=Pt(e);const n=t.$document;if(!n){throw new Error("AST node has no document.")}return n}function Pt(e){while(e.$container){e=e.$container}return e}function Mt(e,t){if(!e){throw new Error("Node must be an AstNode.")}const n=t===null||t===void 0?void 0:t.range;return new f((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{while(t.keyIndex<t.keys.length){const i=t.keys[t.keyIndex];if(!i.startsWith("$")){const s=e[i];if(r(s)){t.keyIndex++;if(Ft(s,n)){return{done:false,value:s}}}else if(Array.isArray(s)){while(t.arrayIndex<s.length){const e=t.arrayIndex++;const i=s[e];if(r(i)&&Ft(i,n)){return{done:false,value:i}}}t.arrayIndex=0}}t.keyIndex++}return m}))}function Dt(e,t){if(!e){throw new Error("Root node must be an AstNode.")}return new y(e,(e=>Mt(e,t)))}function Ut(e,t){if(!e){throw new Error("Root node must be an AstNode.")}else if((t===null||t===void 0?void 0:t.range)&&!Ft(e,t.range)){return new y(e,(()=>[]))}return new y(e,(e=>Mt(e,t)),{includeRoot:true})}function Ft(e,t){var n;if(!t){return true}const r=(n=e.$cstNode)===null||n===void 0?void 0:n.range;if(!r){return false}return S(r,t)}function Gt(e){return new f((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{while(t.keyIndex<t.keys.length){const n=t.keys[t.keyIndex];if(!n.startsWith("$")){const r=e[n];if(i(r)){t.keyIndex++;return{done:false,value:{reference:r,container:e,property:n}}}else if(Array.isArray(r)){while(t.arrayIndex<r.length){const s=t.arrayIndex++;const a=r[s];if(i(a)){return{done:false,value:{reference:a,container:e,property:n,index:s}}}}t.arrayIndex=0}}t.keyIndex++}return m}))}function Bt(e,t=Ot(e).parseResult.value){const n=[];Ut(t).forEach((t=>{Gt(t).forEach((t=>{if(t.reference.ref===e){n.push(t.reference)}}))}));return stream(n)}function Kt(e,t){const n=e.getTypeMetaData(t.$type);const r=t;for(const i of n.properties){if(i.defaultValue!==undefined&&r[i.name]===undefined){r[i.name]=jt(i.defaultValue)}}}function jt(e){if(Array.isArray(e)){return[...e.map(jt)]}else{return e}}function Vt(e,t){const n={$type:e.$type};for(const[r,i]of Object.entries(e)){if(!r.startsWith("$")){if(isAstNode(i)){n[r]=Vt(i,t)}else if(isReference(i)){n[r]=t(n,r,i.$refNode,i.$refText)}else if(Array.isArray(i)){const e=[];for(const s of i){if(isAstNode(s)){e.push(Vt(s,t))}else if(isReference(s)){e.push(t(n,r,s.$refNode,s.$refText))}else{e.push(s)}}n[r]=e}else{n[r]=i}}}Lt(n);return n}function Wt(e){return e.charCodeAt(0)}function Ht(e,t){if(Array.isArray(e)){e.forEach((function(e){t.push(e)}))}else{t.push(e)}}function zt(e,t){if(e[t]===true){throw"duplicate flag "+t}const n=e[t];e[t]=true}function qt(e){if(e===undefined){throw Error("Internal Error - Should never get here!")}return true}function Yt(){throw Error("Internal Error - Should never get here!")}function Xt(e){return e["type"]==="Character"}const Qt=[];for(let Fm=Wt("0");Fm<=Wt("9");Fm++){Qt.push(Fm)}const Jt=[Wt("_")].concat(Qt);for(let Fm=Wt("a");Fm<=Wt("z");Fm++){Jt.push(Fm)}for(let Fm=Wt("A");Fm<=Wt("Z");Fm++){Jt.push(Fm)}const Zt=[Wt(" "),Wt("\f"),Wt("\n"),Wt("\r"),Wt("\t"),Wt("\v"),Wt("\t"),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt("\u2028"),Wt("\u2029"),Wt(" "),Wt(" "),Wt(" "),Wt("\ufeff")];const en=/[0-9a-fA-F]/;const tn=/[0-9]/;const nn=/[1-9]/;class rn{constructor(){this.idx=0;this.input="";this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx;this.input=e.input;this.groupIdx=e.groupIdx}pattern(e){this.idx=0;this.input=e;this.groupIdx=0;this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:false,ignoreCase:false,multiLine:false,unicode:false,sticky:false};while(this.isRegExpFlag()){switch(this.popChar()){case"g":zt(n,"global");break;case"i":zt(n,"ignoreCase");break;case"m":zt(n,"multiLine");break;case"u":zt(n,"unicode");break;case"y":zt(n,"sticky");break}}if(this.idx!==this.input.length){throw Error("Redundant input: "+this.input.substring(this.idx))}return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[];const t=this.idx;e.push(this.alternative());while(this.peekChar()==="|"){this.consumeChar("|");e.push(this.alternative())}return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[];const t=this.idx;while(this.isTerm()){e.push(this.term())}return{type:"Alternative",value:e,loc:this.loc(t)}}term(){if(this.isAssertion()){return this.assertion()}else{return this.atom()}}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break}qt(t);const n=this.disjunction();this.consumeChar(")");return{type:t,value:n,loc:this.loc(e)}}return Yt()}quantifier(e=false){let t=undefined;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:Infinity};break;case"+":t={atLeast:1,atMost:Infinity};break;case"?":t={atLeast:0,atMost:1};break;case"{":const n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let e;if(this.isDigit()){e=this.integerIncludingZero();t={atLeast:n,atMost:e}}else{t={atLeast:n,atMost:Infinity}}this.consumeChar("}");break}if(e===true&&t===undefined){return undefined}qt(t);break}if(e===true&&t===undefined){return undefined}if(qt(t)){if(this.peekChar(0)==="?"){this.consumeChar("?");t.greedy=false}else{t.greedy=true}t.type="Quantifier";t.loc=this.loc(n);return t}}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===undefined&&this.isPatternCharacter()){e=this.patternCharacter()}if(qt(e)){e.loc=this.loc(t);if(this.isQuantifier()){e.quantifier=this.quantifier()}return e}return Yt()}dotAll(){this.consumeChar(".");return{type:"Set",complement:true,value:[Wt("\n"),Wt("\r"),Wt("\u2028"),Wt("\u2029")]}}atomEscape(){this.consumeChar("\\");switch(this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){const e=this.positiveInteger();return{type:"GroupBackReference",value:e}}characterClassEscape(){let e;let t=false;switch(this.popChar()){case"d":e=Qt;break;case"D":e=Qt;t=true;break;case"s":e=Zt;break;case"S":e=Zt;t=true;break;case"w":e=Jt;break;case"W":e=Jt;t=true;break}if(qt(e)){return{type:"Set",value:e,complement:t}}return Yt()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Wt("\f");break;case"n":e=Wt("\n");break;case"r":e=Wt("\r");break;case"t":e=Wt("\t");break;case"v":e=Wt("\v");break}if(qt(e)){return{type:"Character",value:e}}return Yt()}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===false){throw Error("Invalid ")}const t=e.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:t}}nulCharacterAtom(){this.consumeChar("0");return{type:"Character",value:Wt("\0")}}hexEscapeSequenceAtom(){this.consumeChar("x");return this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){this.consumeChar("u");return this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:Wt(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const e=this.popChar();return{type:"Character",value:Wt(e)}}}characterClass(){const e=[];let t=false;this.consumeChar("[");if(this.peekChar(0)==="^"){this.consumeChar("^");t=true}while(this.isClassAtom()){const t=this.classAtom();const n=t.type==="Character";if(Xt(t)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();const r=n.type==="Character";if(Xt(n)){if(n.value<t.value){throw Error("Range out of order in character class")}e.push({from:t.value,to:n.value})}else{Ht(t.value,e);e.push(Wt("-"));Ht(n.value,e)}}else{Ht(t.value,e)}}this.consumeChar("]");return{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){this.consumeChar("\\");switch(this.peekChar()){case"b":this.consumeChar("b");return{type:"Character",value:Wt("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=true;this.consumeChar("(");switch(this.peekChar(0)){case"?":this.consumeChar("?");this.consumeChar(":");e=false;break;default:this.groupIdx++;break}const t=this.disjunction();this.consumeChar(")");const n={type:"Group",capturing:e,value:t};if(e){n["idx"]=this.groupIdx}return n}positiveInteger(){let e=this.popChar();if(nn.test(e)===false){throw Error("Expecting a positive integer")}while(tn.test(this.peekChar(0))){e+=this.popChar()}return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(tn.test(e)===false){throw Error("Expecting an integer")}while(tn.test(this.peekChar(0))){e+=this.popChar()}return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Wt(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return true;default:return false}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return tn.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return false;default:return true}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter()){return true}switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return true;default:return false}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return true;case"\\":switch(this.peekChar(1)){case"b":case"B":return true;default:return false}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return false}}isQuantifier(){const e=this.saveState();try{return this.quantifier(true)!==undefined}catch(t){return false}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return false;default:return true}}parseHexDigits(e){let t="";for(let r=0;r<e;r++){const e=this.popChar();if(en.test(e)===false){throw Error("Expecting a HexDecimal digits")}t+=e}const n=parseInt(t,16);return{type:"Character",value:n}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const e=this.peekChar(0);this.consumeChar(undefined);return e}consumeChar(e){if(e!==undefined&&this.input[this.idx]!==e){throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx)}if(this.idx>=this.input.length){throw Error("Unexpected end of input")}this.idx++}loc(e){return{begin:e,end:this.idx}}}class sn{visitChildren(e){for(const t in e){const n=e[t];if(e.hasOwnProperty(t)){if(n.type!==undefined){this.visit(n)}else if(Array.isArray(n)){n.forEach((e=>{this.visit(e)}),this)}}}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const an=/\r?\n/gm;const on=new rn;class cn extends sn{constructor(){super(...arguments);this.isStarting=true;this.endRegexpStack=[];this.multiline=false}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=false;this.regex=e;this.startRegexp="";this.isStarting=true;this.endRegexpStack=[]}visitGroup(e){if(e.quantifier){this.isStarting=false;this.endRegexpStack=[]}}visitCharacter(e){const t=String.fromCharCode(e.value);if(!this.multiline&&t==="\n"){this.multiline=true}if(e.quantifier){this.isStarting=false;this.endRegexpStack=[]}else{const e=hn(t);this.endRegexpStack.push(e);if(this.isStarting){this.startRegexp+=e}}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end);const n=new RegExp(t);this.multiline=Boolean("\n".match(n))}if(e.quantifier){this.isStarting=false;this.endRegexpStack=[]}else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t);if(this.isStarting){this.startRegexp+=t}}}visitChildren(e){if(e.type==="Group"){const t=e;if(t.quantifier){return}}super.visitChildren(e)}}const un=new cn;function ln(e){try{if(typeof e!=="string"){e=e.source}e=`/${e}/`;const t=on.pattern(e);const n=[];for(const r of t.value.value){un.reset(e);un.visit(r);n.push({start:un.startRegexp,end:un.endRegex})}return n}catch(t){return[]}}function fn(e){try{if(typeof e==="string"){e=new RegExp(e)}e=e.toString();un.reset(e);un.visit(on.pattern(e));return un.multiline}catch(t){return false}}function dn(e){const t=typeof e==="string"?new RegExp(e):e;return t.test(" ")}function hn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pn(e){return Array.prototype.map.call(e,(e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:hn(e))).join("")}function mn(e,t){const n=gn(e);const r=t.match(n);return!!r&&r[0].length>0}function gn(e){if(typeof e==="string"){e=new RegExp(e)}const t=e,n=e.source;let r=0;function i(){let e="",s;function a(t){e+=n.substr(r,t);r+=t}function o(t){e+="(?:"+n.substr(r,t)+"|$)";r+=t}while(r<n.length){switch(n[r]){case"\\":switch(n[r+1]){case"c":o(3);break;case"x":o(4);break;case"u":if(t.unicode){if(n[r+2]==="{"){o(n.indexOf("}",r)-r+1)}else{o(6)}}else{o(2)}break;case"p":case"P":if(t.unicode){o(n.indexOf("}",r)-r+1)}else{o(2)}break;case"k":o(n.indexOf(">",r)-r+1);break;default:o(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g;s.lastIndex=r;s=s.exec(n)||[];o(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":a(1);break;case"{":s=/\{\d+,?\d*\}/g;s.lastIndex=r;s=s.exec(n);if(s){a(s[0].length)}else{o(1)}break;case"(":if(n[r+1]==="?"){switch(n[r+2]){case":":e+="(?:";r+=3;e+=i()+"|$)";break;case"=":e+="(?=";r+=3;e+=i()+")";break;case"!":s=r;r+=3;i();e+=n.substr(s,r-s);break;case"<":switch(n[r+3]){case"=":case"!":s=r;r+=4;i();e+=n.substr(s,r-s);break;default:a(n.indexOf(">",r)-r+1);e+=i()+"|$)";break}break}}else{a(1);e+=i()+"|$)"}break;case")":++r;return e;default:o(1);break}}return e}return new RegExp(i(),e.flags)}function yn(e){return e.rules.find((e=>be(e)&&e.entry))}function An(e){return e.rules.filter((e=>Ke(e)&&e.hidden))}function Tn(e,t){const n=new Set;const r=yn(e);if(!r){return new Set(e.rules)}const i=[r].concat(An(e));for(const a of i){vn(a,n,t)}const s=new Set;for(const a of e.rules){if(n.has(a.name)||Ke(a)&&a.hidden){s.add(a)}}return s}function vn(e,t,n){t.add(e.name);Dt(e).forEach((e=>{if(gt(e)||n&&Rt(e)){const r=e.rule.ref;if(r&&!t.has(r.name)){vn(r,t,n)}}}))}function En(e){if(e.terminal){return e.terminal}else if(e.type.ref){const t=$n(e.type.ref);return t===null||t===void 0?void 0:t.terminal}return undefined}function Rn(e){return e.hidden&&!Vn(e).test(" ")}function kn(e,t){if(!e||!t){return[]}return In(e,t,e.astNode,true)}function xn(e,t,n){if(!e||!t){return undefined}const r=In(e,t,e.astNode,true);if(r.length===0){return undefined}if(n!==undefined){n=Math.max(0,Math.min(n,r.length-1))}else{n=0}return r[n]}function In(e,t,n,r){if(!r){const n=bt(e.grammarSource,et);if(n&&n.feature===t){return[e]}}if(c(e)&&e.astNode===n){return e.content.flatMap((e=>In(e,t,n,false)))}return[]}function Sn(e,t){if(!e){return[]}return Nn(e,t,e===null||e===void 0?void 0:e.astNode)}function wn(e,t,n){if(!e){return undefined}const r=Nn(e,t,e===null||e===void 0?void 0:e.astNode);if(r.length===0){return undefined}if(n!==undefined){n=Math.max(0,Math.min(n,r.length-1))}else{n=0}return r[n]}function Nn(e,t,n){if(e.astNode!==n){return[]}if(lt(e.grammarSource)&&e.grammarSource.value===t){return[e]}const r=T(e).iterator();let i;const s=[];do{i=r.next();if(!i.done){const e=i.value;if(e.astNode===n){if(lt(e.grammarSource)&&e.grammarSource.value===t){s.push(e)}}else{r.prune()}}}while(!i.done);return s}function Cn(e){var t;const n=e.astNode;while(n===((t=e.container)===null||t===void 0?void 0:t.astNode)){const t=bt(e.grammarSource,et);if(t){return t}e=e.container}return undefined}function $n(e){let t=e;if(Ae(t)){if(Xe(t.$container)){t=t.$container.$container}else if(be(t.$container)){t=t.$container}else{B(t.$container)}}return Ln(e,t,new Map)}function Ln(e,t,n){var r;function i(t,r){let i=undefined;const s=bt(t,et);if(!s){i=Ln(r,r,n)}n.set(e,i);return i}if(n.has(e)){return n.get(e)}n.set(e,undefined);for(const s of Dt(t)){if(et(s)&&s.feature.toLowerCase()==="name"){n.set(e,s);return s}else if(gt(s)&&be(s.rule.ref)){return i(s,s.rule.ref)}else if(Ue(s)&&((r=s.typeRef)===null||r===void 0?void 0:r.ref)){return i(s,s.typeRef.ref)}}return undefined}function bn(e){const t=e.$container;if(ast.isGroup(t)){const n=t.elements;const r=n.indexOf(e);for(let e=r-1;e>=0;e--){const t=n[e];if(ast.isAction(t)){return t}else{const t=streamAllContents(n[e]).find(ast.isAction);if(t){return t}}}}if(ast.isAbstractElement(t)){return bn(t)}else{return undefined}}function _n(e,t){return e==="?"||e==="*"||ast.isGroup(t)&&Boolean(t.guardCondition)}function On(e){return e==="*"||e==="+"}function Pn(e){return e==="+="}function Mn(e){return Dn(e,new Set)}function Dn(e,t){if(t.has(e)){return true}else{t.add(e)}for(const n of Dt(e)){if(gt(n)){if(!n.rule.ref){return false}if(be(n.rule.ref)&&!Dn(n.rule.ref,t)){return false}}else if(et(n)){return false}else if(Xe(n)){return false}}return Boolean(e.definition)}function Un(e){return Fn(e.type,new Set)}function Fn(e,t){if(t.has(e)){return true}else{t.add(e)}if(ast.isArrayType(e)){return false}else if(ast.isReferenceType(e)){return false}else if(ast.isUnionType(e)){return e.types.every((e=>Fn(e,t)))}else if(ast.isSimpleType(e)){if(e.primitiveType!==undefined){return true}else if(e.stringType!==undefined){return true}else if(e.typeRef!==undefined){const n=e.typeRef.ref;if(ast.isType(n)){return Fn(n.type,t)}else{return false}}else{return false}}else{return false}}function Gn(e){if(e.inferredType){return e.inferredType.name}else if(e.dataType){return e.dataType}else if(e.returnType){const t=e.returnType.ref;if(t){if(be(t)){return t.name}else if(ve(t)||Ve(t)){return t.name}}}return undefined}function Bn(e){var t;if(be(e)){return Mn(e)?e.name:(t=Gn(e))!==null&&t!==void 0?t:e.name}else if(ve(e)||Ve(e)||Me(e)){return e.name}else if(Xe(e)){const t=Kn(e);if(t){return t}}else if(Ae(e)){return e.name}throw new Error("Cannot get name of Unknown Type")}function Kn(e){var t;if(e.inferredType){return e.inferredType.name}else if((t=e.type)===null||t===void 0?void 0:t.ref){return Bn(e.type.ref)}return undefined}function jn(e){var t,n,r;if(Ke(e)){return(n=(t=e.type)===null||t===void 0?void 0:t.name)!==null&&n!==void 0?n:"string"}else{return Mn(e)?e.name:(r=Gn(e))!==null&&r!==void 0?r:e.name}}function Vn(e){const t={s:false,i:false,u:false};const n=Hn(e.definition,t);const r=Object.entries(t).filter((([,e])=>e)).map((([e])=>e)).join("");return new RegExp(n,r)}const Wn=/[\s\S]/.source;function Hn(e,t){if(At(e)){return zn(e)}else if(vt(e)){return qn(e)}else if(nt(e)){return Qn(e)}else if(Rt(e)){const t=e.rule.ref;if(!t){throw new Error("Missing rule reference.")}return Zn(Hn(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead})}else if(dt(e)){return Xn(e)}else if(St(e)){return Yn(e)}else if(pt(e)){const n=e.regex.lastIndexOf("/");const r=e.regex.substring(1,n);const i=e.regex.substring(n+1);if(t){t.i=i.includes("i");t.s=i.includes("s");t.u=i.includes("u")}return Zn(r,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:false})}else if(Nt(e)){return Zn(Wn,{cardinality:e.cardinality,lookahead:e.lookahead})}else{throw new Error(`Invalid terminal element: ${e===null||e===void 0?void 0:e.$type}`)}}function zn(e){return Zn(e.elements.map((e=>Hn(e))).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead})}function qn(e){return Zn(e.elements.map((e=>Hn(e))).join(""),{cardinality:e.cardinality,lookahead:e.lookahead})}function Yn(e){return Zn(`${Wn}*?${Hn(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead})}function Xn(e){return Zn(`(?!${Hn(e.terminal)})${Wn}*?`,{cardinality:e.cardinality,lookahead:e.lookahead})}function Qn(e){if(e.right){return Zn(`[${Jn(e.left)}-${Jn(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:false})}return Zn(Jn(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,wrap:false})}function Jn(e){return hn(e.value)}function Zn(e,t){var n;if(t.wrap!==false||t.lookahead){e=`(${(n=t.lookahead)!==null&&n!==void 0?n:""}${e})`}if(t.cardinality){return`${e}${t.cardinality}`}return e}function er(e){const t=[];const n=e.Grammar;for(const r of n.rules){if(Ke(r)&&Rn(r)&&fn(Vn(r))){t.push(r.name)}}return{multilineCommentRules:t,nameRegexp:w}}var tr=n(69769);var nr=n(44882);var rr=n(74650);var ir=n(8937);var sr=n(2850);var ar=n(97134);function or(e){function t(){}t.prototype=e;const n=new t;function r(){return typeof n.bar}r();r();if(true)return e;(0,eval)(e)}function cr(e,t,n){var r=-1,i=e.length;if(t<0){t=-t>i?0:i+t}n=n>i?i:n;if(n<0){n+=i}i=t>n?0:n-t>>>0;t>>>=0;var s=Array(i);while(++r<i){s[r]=e[r+t]}return s}const ur=cr;var lr=n(29914);function fr(e,t,n){var r=e==null?0:e.length;if(!r){return[]}t=n||t===undefined?1:(0,lr.A)(t);return ur(e,t<0?0:t,r)}const dr=fr;var hr=n(86378);var pr=n(16542);var mr=n(376);var gr=n(56280);var yr=n(21585);var Ar=n(690);var Tr=n(37947);var vr=Object.prototype;var Er=vr.hasOwnProperty;var Rr=(0,gr.A)((function(e,t){if((0,Ar.A)(t)||(0,yr.A)(t)){(0,mr.A)(t,(0,Tr.A)(t),e);return}for(var n in t){if(Er.call(t,n)){(0,pr.A)(e,n,t[n])}}}));const kr=Rr;var xr=n(98519);var Ir=n(1121);var Sr=n(44835);var wr=n(37138);function Nr(e,t){if(e==null){return{}}var n=(0,xr.A)((0,wr.A)(e),(function(e){return[e]}));t=(0,Ir.A)(t);return(0,Sr.A)(e,n,(function(e,n){return t(e,n[0])}))}const Cr=Nr;var $r=n(64128);var Lr=n(53315);var br="[object RegExp]";function _r(e){return(0,Lr.A)(e)&&(0,$r.A)(e)==br}const Or=_r;var Pr=n(26132);var Mr=n(89986);var Dr=Mr.A&&Mr.A.isRegExp;var Ur=Dr?(0,Pr.A)(Dr):Or;const Fr=Ur;function Gr(e){if(Br(e)){return e.LABEL}else{return e.name}}function Br(e){return(0,hr.A)(e.LABEL)&&e.LABEL!==""}class Kr{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this);(0,tr.A)(this.definition,(t=>{t.accept(e)}))}}class jr extends Kr{constructor(e){super([]);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}set definition(e){}get definition(){if(this.referencedRule!==undefined){return this.referencedRule.definition}return[]}accept(e){e.visit(this)}}class Vr extends Kr{constructor(e){super(e.definition);this.orgText="";kr(this,Cr(e,(e=>e!==undefined)))}}class Wr extends Kr{constructor(e){super(e.definition);this.ignoreAmbiguities=false;kr(this,Cr(e,(e=>e!==undefined)))}}class Hr extends Kr{constructor(e){super(e.definition);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}}class zr extends Kr{constructor(e){super(e.definition);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}}class qr extends Kr{constructor(e){super(e.definition);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}}class Yr extends Kr{constructor(e){super(e.definition);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}}class Xr extends Kr{constructor(e){super(e.definition);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}}class Qr extends Kr{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition);this.idx=1;this.ignoreAmbiguities=false;this.hasPredicates=false;kr(this,Cr(e,(e=>e!==undefined)))}}class Jr{constructor(e){this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}accept(e){e.visit(this)}}function Zr(e){return(0,ir.A)(e,ei)}function ei(e){function t(e){return(0,ir.A)(e,ei)}if(e instanceof jr){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if((0,hr.A)(e.label)){t.label=e.label}return t}else if(e instanceof Wr){return{type:"Alternative",definition:t(e.definition)}}else if(e instanceof Hr){return{type:"Option",idx:e.idx,definition:t(e.definition)}}else if(e instanceof zr){return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)}}else if(e instanceof qr){return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:ei(new Jr({terminalType:e.separator})),definition:t(e.definition)}}else if(e instanceof Xr){return{type:"RepetitionWithSeparator",idx:e.idx,separator:ei(new Jr({terminalType:e.separator})),definition:t(e.definition)}}else if(e instanceof Yr){return{type:"Repetition",idx:e.idx,definition:t(e.definition)}}else if(e instanceof Qr){return{type:"Alternation",idx:e.idx,definition:t(e.definition)}}else if(e instanceof Jr){const t={type:"Terminal",name:e.terminalType.name,label:Gr(e.terminalType),idx:e.idx};if((0,hr.A)(e.label)){t.terminalLabel=e.label}const n=e.terminalType.PATTERN;if(e.terminalType.PATTERN){t.pattern=Fr(n)?n.source:n}return t}else if(e instanceof Vr){return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)}}else{throw Error("non exhaustive match")}}class ti{visit(e){const t=e;switch(t.constructor){case jr:return this.visitNonTerminal(t);case Wr:return this.visitAlternative(t);case Hr:return this.visitOption(t);case zr:return this.visitRepetitionMandatory(t);case qr:return this.visitRepetitionMandatoryWithSeparator(t);case Xr:return this.visitRepetitionWithSeparator(t);case Yr:return this.visitRepetition(t);case Qr:return this.visitAlternation(t);case Jr:return this.visitTerminal(t);case Vr:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}var ni=n(95345);var ri=n(15912);function ii(e,t){var n;(0,ri.A)(e,(function(e,r,i){n=t(e,r,i);return!n}));return!!n}const si=ii;var ai=n(39990);var oi=n(31943);function ci(e,t,n){var r=(0,ai.A)(e)?ni.A:si;if(n&&(0,oi.A)(e,t,n)){t=undefined}return r(e,(0,Ir.A)(t,3))}const ui=ci;var li=n(54949);var fi=Math.max;function di(e,t,n,r){e=(0,yr.A)(e)?e:(0,nr.A)(e);n=n&&!r?(0,lr.A)(n):0;var i=e.length;if(n<0){n=fi(i+n,0)}return(0,hr.A)(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&(0,li.A)(e,t,n)>-1}const hi=di;function pi(e,t){var n=-1,r=e==null?0:e.length;while(++n<r){if(!t(e[n],n,e)){return false}}return true}const mi=pi;function gi(e,t){var n=true;(0,ri.A)(e,(function(e,r,i){n=!!t(e,r,i);return n}));return n}const yi=gi;function Ai(e,t,n){var r=(0,ai.A)(e)?mi:yi;if(n&&(0,oi.A)(e,t,n)){t=undefined}return r(e,(0,Ir.A)(t,3))}const Ti=Ai;function vi(e){return e instanceof Wr||e instanceof Hr||e instanceof Yr||e instanceof zr||e instanceof qr||e instanceof Xr||e instanceof Jr||e instanceof Vr}function Ei(e,t=[]){const n=e instanceof Hr||e instanceof Yr||e instanceof Xr;if(n){return true}if(e instanceof Qr){return ui(e.definition,(e=>Ei(e,t)))}else if(e instanceof jr&&hi(t,e)){return false}else if(e instanceof Kr){if(e instanceof jr){t.push(e)}return Ti(e.definition,(e=>Ei(e,t)))}else{return false}}function Ri(e){return e instanceof Qr}function ki(e){if(e instanceof jr){return"SUBRULE"}else if(e instanceof Hr){return"OPTION"}else if(e instanceof Qr){return"OR"}else if(e instanceof zr){return"AT_LEAST_ONE"}else if(e instanceof qr){return"AT_LEAST_ONE_SEP"}else if(e instanceof Xr){return"MANY_SEP"}else if(e instanceof Yr){return"MANY"}else if(e instanceof Jr){return"CONSUME"}else{throw Error("non exhaustive match")}}class xi{walk(e,t=[]){(0,tr.A)(e.definition,((n,r)=>{const i=dr(e.definition,r+1);if(n instanceof jr){this.walkProdRef(n,i,t)}else if(n instanceof Jr){this.walkTerminal(n,i,t)}else if(n instanceof Wr){this.walkFlat(n,i,t)}else if(n instanceof Hr){this.walkOption(n,i,t)}else if(n instanceof zr){this.walkAtLeastOne(n,i,t)}else if(n instanceof qr){this.walkAtLeastOneSep(n,i,t)}else if(n instanceof Xr){this.walkManySep(n,i,t)}else if(n instanceof Yr){this.walkMany(n,i,t)}else if(n instanceof Qr){this.walkOr(n,i,t)}else{throw Error("non exhaustive match")}}))}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new Hr({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=Ii(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new Hr({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=Ii(e,t,n);this.walk(e,r)}walkOr(e,t,n){const r=t.concat(n);(0,tr.A)(e.definition,(e=>{const t=new Wr({definition:[e]});this.walk(t,r)}))}}function Ii(e,t,n){const r=[new Hr({definition:[new Jr({terminalType:e.separator})].concat(e.definition)})];const i=r.concat(t,n);return i}var Si=n(19363);function wi(e){return e&&e.length?(0,Si.A)(e):[]}const Ni=wi;var Ci=n(74033);function $i(e){if(e instanceof jr){return $i(e.referencedRule)}else if(e instanceof Jr){return _i(e)}else if(vi(e)){return Li(e)}else if(Ri(e)){return bi(e)}else{throw Error("non exhaustive match")}}function Li(e){let t=[];const n=e.definition;let r=0;let i=n.length>r;let s;let a=true;while(i&&a){s=n[r];a=Ei(s);t=t.concat($i(s));r=r+1;i=n.length>r}return Ni(t)}function bi(e){const t=(0,ir.A)(e.definition,(e=>$i(e)));return Ni((0,Ci.A)(t))}function _i(e){return[e.terminalType]}const Oi="_~IN~_";class Pi extends xi{constructor(e){super();this.topProd=e;this.follows={}}startWalking(){this.walk(this.topProd);return this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=Di(e.referencedRule,e.idx)+this.topProd.name;const i=t.concat(n);const s=new Wr({definition:i});const a=$i(s);this.follows[r]=a}}function Mi(e){const t={};(0,tr.A)(e,(e=>{const n=new Pi(e).startWalking();kr(t,n)}));return t}function Di(e,t){return e.name+t+Oi}function Ui(e){const t=e.terminalType.name;return t+e.idx+IN}var Fi=n(89523);var Gi=n(38693);var Bi=n(89191);var Ki=n(64725);var ji="Expected a function";function Vi(e){if(typeof e!="function"){throw new TypeError(ji)}return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}const Wi=Vi;function Hi(e,t){var n=(0,ai.A)(e)?Bi.A:Ki.A;return n(e,Wi((0,Ir.A)(t,3)))}const zi=Hi;var qi=n(58807);var Yi=Math.max;function Xi(e,t,n){var r=e==null?0:e.length;if(!r){return-1}var i=n==null?0:(0,lr.A)(n);if(i<0){i=Yi(r+i,0)}return(0,li.A)(e,t,i)}const Qi=Xi;var Ji=n(65339);var Zi=n(97133);var es=n(63344);var ts=n(43212);var ns=n(7348);var rs=n(4832);var is=200;function ss(e,t,n,r){var i=-1,s=ts.A,a=true,o=e.length,c=[],u=t.length;if(!o){return c}if(n){t=(0,xr.A)(t,(0,Pr.A)(n))}if(r){s=ns.A;a=false}else if(t.length>=is){s=rs.A;a=false;t=new es.A(t)}e:while(++i<o){var l=e[i],f=n==null?l:n(l);l=r||l!==0?l:0;if(a&&f===f){var d=u;while(d--){if(t[d]===f){continue e}}c.push(l)}else if(!s(t,f,r)){c.push(l)}}return c}const as=ss;var os=n(62040);var cs=n(55881);var us=n(10654);var ls=(0,cs.A)((function(e,t){return(0,us.A)(e)?as(e,(0,os.A)(t,1,us.A,true)):[]}));const fs=ls;function ds(e){var t=-1,n=e==null?0:e.length,r=0,i=[];while(++t<n){var s=e[t];if(s){i[r++]=s}}return i}const hs=ds;function ps(e){return e&&e.length?e[0]:undefined}const ms=ps;var gs=n(85075);function ys(e){if(console&&console.error){console.error(`Error: ${e}`)}}function As(e){if(console&&console.warn){console.warn(`Warning: ${e}`)}}let Ts={};const vs=new rn;function Es(e){const t=e.toString();if(Ts.hasOwnProperty(t)){return Ts[t]}else{const e=vs.pattern(t);Ts[t]=e;return e}}function Rs(){Ts={}}const ks="Complement Sets are not supported for first char optimization";const xs='Unable to use "first char" lexer optimizations:\n';function Is(e,t=false){try{const t=Es(e);const n=Ss(t.value,{},t.flags.ignoreCase);return n}catch(n){if(n.message===ks){if(t){As(`${xs}`+`\tUnable to optimize: < ${e.toString()} >\n`+"\tComplement Sets cannot be automatically optimized.\n"+"\tThis will disable the lexer's first char optimizations.\n"+"\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.")}}else{let n="";if(t){n="\n\tThis will disable the lexer's first char optimizations.\n"+"\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."}ys(`${xs}\n`+`\tFailed parsing: < ${e.toString()} >\n`+`\tUsing the @chevrotain/regexp-to-ast library\n`+"\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues"+n)}}return[]}function Ss(e,t,n){switch(e.type){case"Disjunction":for(let i=0;i<e.value.length;i++){Ss(e.value[i],t,n)}break;case"Alternative":const r=e.value;for(let e=0;e<r.length;e++){const i=r[e];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const s=i;switch(s.type){case"Character":ws(s.value,t,n);break;case"Set":if(s.complement===true){throw Error(ks)}(0,tr.A)(s.value,(e=>{if(typeof e==="number"){ws(e,t,n)}else{const r=e;if(n===true){for(let e=r.from;e<=r.to;e++){ws(e,t,n)}}else{for(let e=r.from;e<=r.to&&e<pa;e++){ws(e,t,n)}if(r.to>=pa){const e=r.from>=pa?r.from:pa;const n=r.to;const i=ga(e);const s=ga(n);for(let r=i;r<=s;r++){t[r]=r}}}}}));break;case"Group":Ss(s.value,t,n);break;default:throw Error("Non Exhaustive Match")}const a=s.quantifier!==undefined&&s.quantifier.atLeast===0;if(s.type==="Group"&&$s(s)===false||s.type!=="Group"&&a===false){break}}break;default:throw Error("non exhaustive match!")}return(0,nr.A)(t)}function ws(e,t,n){const r=ga(e);t[r]=r;if(n===true){Ns(e,t)}}function Ns(e,t){const n=String.fromCharCode(e);const r=n.toUpperCase();if(r!==n){const e=ga(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=ga(e.charCodeAt(0));t[n]=n}}}function Cs(e,t){return(0,gs.A)(e.value,(e=>{if(typeof e==="number"){return hi(t,e)}else{const n=e;return(0,gs.A)(t,(e=>n.from<=e&&e<=n.to))!==undefined}}))}function $s(e){const t=e.quantifier;if(t&&t.atLeast===0){return true}if(!e.value){return false}return(0,ai.A)(e.value)?Ti(e.value,$s):$s(e.value)}class Ls extends sn{constructor(e){super();this.targetCharCodes=e;this.found=false}visitChildren(e){if(this.found===true){return}switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}visitCharacter(e){if(hi(this.targetCharCodes,e.value)){this.found=true}}visitSet(e){if(e.complement){if(Cs(e,this.targetCharCodes)===undefined){this.found=true}}else{if(Cs(e,this.targetCharCodes)!==undefined){this.found=true}}}}function bs(e,t){if(t instanceof RegExp){const n=Es(t);const r=new Ls(e);r.visit(n);return r.found}else{return(0,gs.A)(t,(t=>hi(e,t.charCodeAt(0))))!==undefined}}const _s="PATTERN";const Os="defaultMode";const Ps="modes";let Ms=typeof new RegExp("(?:)").sticky==="boolean";function Ds(){Ms=false}function Us(){Ms=true}function Fs(e,t){t=(0,Gi.A)(t,{useSticky:Ms,debug:false,safeMode:false,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()});const n=t.tracer;n("initCharCodeToOptimizedIndexMap",(()=>{ya()}));let r;n("Reject Lexer.NA",(()=>{r=zi(e,(e=>e[_s]===Ga.NA))}));let i=false;let s;n("Transform Patterns",(()=>{i=false;s=(0,ir.A)(r,(e=>{const n=e[_s];if(Fr(n)){const e=n.source;if(e.length===1&&e!=="^"&&e!=="$"&&e!=="."&&!n.ignoreCase){return e}else if(e.length===2&&e[0]==="\\"&&!hi(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])){return e[1]}else{return t.useSticky?ra(n):na(n)}}else if((0,qi.A)(n)){i=true;return{exec:n}}else if(typeof n==="object"){i=true;return n}else if(typeof n==="string"){if(n.length===1){return n}else{const e=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&");const r=new RegExp(e);return t.useSticky?ra(r):na(r)}}else{throw Error("non exhaustive match")}}))}));let a;let o;let c;let u;let l;n("misc mapping",(()=>{a=(0,ir.A)(r,(e=>e.tokenTypeIdx));o=(0,ir.A)(r,(e=>{const t=e.GROUP;if(t===Ga.SKIPPED){return undefined}else if((0,hr.A)(t)){return t}else if((0,Fi.A)(t)){return false}else{throw Error("non exhaustive match")}}));c=(0,ir.A)(r,(e=>{const t=e.LONGER_ALT;if(t){const e=(0,ai.A)(t)?(0,ir.A)(t,(e=>Qi(r,e))):[Qi(r,t)];return e}}));u=(0,ir.A)(r,(e=>e.PUSH_MODE));l=(0,ir.A)(r,(e=>(0,sr.A)(e,"POP_MODE")))}));let f;n("Line Terminator Handling",(()=>{const e=da(t.lineTerminatorCharacters);f=(0,ir.A)(r,(e=>false));if(t.positionTracking!=="onlyOffset"){f=(0,ir.A)(r,(t=>{if((0,sr.A)(t,"LINE_BREAKS")){return!!t.LINE_BREAKS}else{return la(t,e)===false&&bs(e,t.PATTERN)}}))}}));let d;let h;let p;let m;n("Misc Mapping #2",(()=>{d=(0,ir.A)(r,oa);h=(0,ir.A)(s,ca);p=(0,Ji.A)(r,((e,t)=>{const n=t.GROUP;if((0,hr.A)(n)&&!(n===Ga.SKIPPED)){e[n]=[]}return e}),{});m=(0,ir.A)(s,((e,t)=>({pattern:s[t],longerAlt:c[t],canLineTerminator:f[t],isCustom:d[t],short:h[t],group:o[t],push:u[t],pop:l[t],tokenTypeIdx:a[t],tokenType:r[t]})))}));let g=true;let y=[];if(!t.safeMode){n("First Char Optimization",(()=>{y=(0,Ji.A)(r,((e,n,r)=>{if(typeof n.PATTERN==="string"){const t=n.PATTERN.charCodeAt(0);const i=ga(t);ha(e,i,m[r])}else if((0,ai.A)(n.START_CHARS_HINT)){let t;(0,tr.A)(n.START_CHARS_HINT,(n=>{const i=typeof n==="string"?n.charCodeAt(0):n;const s=ga(i);if(t!==s){t=s;ha(e,s,m[r])}}))}else if(Fr(n.PATTERN)){if(n.PATTERN.unicode){g=false;if(t.ensureOptimizations){ys(`${xs}`+`\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n`+"\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n"+"\tThis will disable the lexer's first char optimizations.\n"+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE")}}else{const i=Is(n.PATTERN,t.ensureOptimizations);if((0,rr.A)(i)){g=false}(0,tr.A)(i,(t=>{ha(e,t,m[r])}))}}else{if(t.ensureOptimizations){ys(`${xs}`+`\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n`+"\tThis will disable the lexer's first char optimizations.\n"+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE")}g=false}return e}),[])}))}return{emptyGroups:p,patternIdxToConfig:m,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:g}}function Gs(e,t){let n=[];const r=Ks(e);n=n.concat(r.errors);const i=js(r.valid);const s=i.valid;n=n.concat(i.errors);n=n.concat(Bs(s));n=n.concat(Qs(s));n=n.concat(Js(s,t));n=n.concat(Zs(s));return n}function Bs(e){let t=[];const n=(0,Zi.A)(e,(e=>Fr(e[_s])));t=t.concat(Ws(n));t=t.concat(qs(n));t=t.concat(Ys(n));t=t.concat(Xs(n));t=t.concat(Hs(n));return t}function Ks(e){const t=(0,Zi.A)(e,(e=>!(0,sr.A)(e,_s)));const n=(0,ir.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:Ua.MISSING_PATTERN,tokenTypes:[e]})));const r=fs(e,t);return{errors:n,valid:r}}function js(e){const t=(0,Zi.A)(e,(e=>{const t=e[_s];return!Fr(t)&&!(0,qi.A)(t)&&!(0,sr.A)(t,"exec")&&!(0,hr.A)(t)}));const n=(0,ir.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a"+" Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Ua.INVALID_PATTERN,tokenTypes:[e]})));const r=fs(e,t);return{errors:n,valid:r}}const Vs=/[^\\][$]/;function Ws(e){class t extends sn{constructor(){super(...arguments);this.found=false}visitEndAnchor(e){this.found=true}}const n=(0,Zi.A)(e,(e=>{const n=e.PATTERN;try{const e=Es(n);const r=new t;r.visit(e);return r.found}catch(r){return Vs.test(n.source)}}));const r=(0,ir.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n"+"\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n"+"\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS"+"\tfor details.",type:Ua.EOI_ANCHOR_FOUND,tokenTypes:[e]})));return r}function Hs(e){const t=(0,Zi.A)(e,(e=>{const t=e.PATTERN;return t.test("")}));const n=(0,ir.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:Ua.EMPTY_MATCH_PATTERN,tokenTypes:[e]})));return n}const zs=/[^\\[][\^]|^\^/;function qs(e){class t extends sn{constructor(){super(...arguments);this.found=false}visitStartAnchor(e){this.found=true}}const n=(0,Zi.A)(e,(e=>{const n=e.PATTERN;try{const e=Es(n);const r=new t;r.visit(e);return r.found}catch(r){return zs.test(n.source)}}));const r=(0,ir.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n"+"\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n"+"\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS"+"\tfor details.",type:Ua.SOI_ANCHOR_FOUND,tokenTypes:[e]})));return r}function Ys(e){const t=(0,Zi.A)(e,(e=>{const t=e[_s];return t instanceof RegExp&&(t.multiline||t.global)}));const n=(0,ir.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Ua.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]})));return n}function Xs(e){const t=[];let n=(0,ir.A)(e,(n=>(0,Ji.A)(e,((e,r)=>{if(n.PATTERN.source===r.PATTERN.source&&!hi(t,r)&&r.PATTERN!==Ga.NA){t.push(r);e.push(r);return e}return e}),[])));n=hs(n);const r=(0,Zi.A)(n,(e=>e.length>1));const i=(0,ir.A)(r,(e=>{const t=(0,ir.A)(e,(e=>e.name));const n=ms(e).PATTERN;return{message:`The same RegExp pattern ->${n}<-`+`has been used in all of the following Token Types: ${t.join(", ")} <-`,type:Ua.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}));return i}function Qs(e){const t=(0,Zi.A)(e,(e=>{if(!(0,sr.A)(e,"GROUP")){return false}const t=e.GROUP;return t!==Ga.SKIPPED&&t!==Ga.NA&&!(0,hr.A)(t)}));const n=(0,ir.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Ua.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]})));return n}function Js(e,t){const n=(0,Zi.A)(e,(e=>e.PUSH_MODE!==undefined&&!hi(t,e.PUSH_MODE)));const r=(0,ir.A)(n,(e=>{const t=`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-`+`which does not exist`;return{message:t,type:Ua.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}));return r}function Zs(e){const t=[];const n=(0,Ji.A)(e,((e,t,n)=>{const r=t.PATTERN;if(r===Ga.NA){return e}if((0,hr.A)(r)){e.push({str:r,idx:n,tokenType:t})}else if(Fr(r)&&ta(r)){e.push({str:r.source,idx:n,tokenType:t})}return e}),[]);(0,tr.A)(e,((e,r)=>{(0,tr.A)(n,(({str:n,idx:i,tokenType:s})=>{if(r<i&&ea(n,e.PATTERN)){const n=`Token: ->${s.name}<- can never be matched.\n`+`Because it appears AFTER the Token Type ->${e.name}<-`+`in the lexer's definition.\n`+`See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:Ua.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}}))}));return t}function ea(e,t){if(Fr(t)){const n=t.exec(e);return n!==null&&n.index===0}else if((0,qi.A)(t)){return t(e,0,[],{})}else if((0,sr.A)(t,"exec")){return t.exec(e,0,[],{})}else if(typeof t==="string"){return t===e}else{throw Error("non exhaustive match")}}function ta(e){const t=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,gs.A)(t,(t=>e.source.indexOf(t)!==-1))===undefined}function na(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function ra(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function ia(e,t,n){const r=[];if(!(0,sr.A)(e,Os)){r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Os+"> property in its definition\n",type:Ua.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE})}if(!(0,sr.A)(e,Ps)){r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ps+"> property in its definition\n",type:Ua.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY})}if((0,sr.A)(e,Ps)&&(0,sr.A)(e,Os)&&!(0,sr.A)(e.modes,e.defaultMode)){r.push({message:`A MultiMode Lexer cannot be initialized with a ${Os}: <${e.defaultMode}>`+`which does not exist\n`,type:Ua.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST})}if((0,sr.A)(e,Ps)){(0,tr.A)(e.modes,((e,t)=>{(0,tr.A)(e,((n,i)=>{if((0,Fi.A)(n)){r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:`+`<${t}> at index: <${i}>\n`,type:Ua.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}else if((0,sr.A)(n,"LONGER_ALT")){const i=(0,ai.A)(n.LONGER_ALT)?n.LONGER_ALT:[n.LONGER_ALT];(0,tr.A)(i,(i=>{if(!(0,Fi.A)(i)&&!hi(e,i)){r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${n.name}> outside of mode <${t}>\n`,type:Ua.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}}))}}))}))}return r}function sa(e,t,n){const r=[];let i=false;const s=hs((0,Ci.A)((0,nr.A)(e.modes)));const a=zi(s,(e=>e[_s]===Ga.NA));const o=da(n);if(t){(0,tr.A)(a,(e=>{const t=la(e,o);if(t!==false){const n=fa(e,t);const i={message:n,type:t.issue,tokenType:e};r.push(i)}else{if((0,sr.A)(e,"LINE_BREAKS")){if(e.LINE_BREAKS===true){i=true}}else{if(bs(o,e.PATTERN)){i=true}}}}))}if(t&&!i){r.push({message:"Warning: No LINE_BREAKS Found.\n"+"\tThis Lexer has been defined to track line and column information,\n"+"\tBut none of the Token Types can be identified as matching a line terminator.\n"+"\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n"+"\tfor details.",type:Ua.NO_LINE_BREAKS_FLAGS})}return r}function aa(e){const t={};const n=(0,Tr.A)(e);(0,tr.A)(n,(n=>{const r=e[n];if((0,ai.A)(r)){t[n]=[]}else{throw Error("non exhaustive match")}}));return t}function oa(e){const t=e.PATTERN;if(Fr(t)){return false}else if((0,qi.A)(t)){return true}else if((0,sr.A)(t,"exec")){return true}else if((0,hr.A)(t)){return false}else{throw Error("non exhaustive match")}}function ca(e){if((0,hr.A)(e)&&e.length===1){return e.charCodeAt(0)}else{return false}}const ua={test:function(e){const t=e.length;for(let n=this.lastIndex;n<t;n++){const t=e.charCodeAt(n);if(t===10){this.lastIndex=n+1;return true}else if(t===13){if(e.charCodeAt(n+1)===10){this.lastIndex=n+2}else{this.lastIndex=n+1}return true}}return false},lastIndex:0};function la(e,t){if((0,sr.A)(e,"LINE_BREAKS")){return false}else{if(Fr(e.PATTERN)){try{bs(t,e.PATTERN)}catch(n){return{issue:Ua.IDENTIFY_TERMINATOR,errMsg:n.message}}return false}else if((0,hr.A)(e.PATTERN)){return false}else if(oa(e)){return{issue:Ua.CUSTOM_LINE_BREAK}}else{throw Error("non exhaustive match")}}}function fa(e,t){if(t.issue===Ua.IDENTIFY_TERMINATOR){return"Warning: unable to identify line terminator usage in pattern.\n"+`\tThe problem is in the <${e.name}> Token Type\n`+`\t Root cause: ${t.errMsg}.\n`+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR"}else if(t.issue===Ua.CUSTOM_LINE_BREAK){return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n"+`\tThe problem is in the <${e.name}> Token Type\n`+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK"}else{throw Error("non exhaustive match")}}function da(e){const t=(0,ir.A)(e,(e=>{if((0,hr.A)(e)){return e.charCodeAt(0)}else{return e}}));return t}function ha(e,t,n){if(e[t]===undefined){e[t]=[n]}else{e[t].push(n)}}const pa=256;let ma=[];function ga(e){return e<pa?e:ma[e]}function ya(){if((0,rr.A)(ma)){ma=new Array(65536);for(let e=0;e<65536;e++){ma[e]=e>255?255+~~(e/255):e}}}var Aa=n(63077);var Ta=n(42111);var va=n(80359);function Ea(e){const t=(new Date).getTime();const n=e();const r=(new Date).getTime();const i=r-t;return{time:i,value:n}}function Ra(e,t){const n=e.tokenTypeIdx;if(n===t.tokenTypeIdx){return true}else{return t.isParent===true&&t.categoryMatchesMap[n]===true}}function ka(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}let xa=1;const Ia={};function Sa(e){const t=wa(e);Na(t);$a(t);Ca(t);(0,tr.A)(t,(e=>{e.isParent=e.categoryMatches.length>0}))}function wa(e){let t=(0,ar.A)(e);let n=e;let r=true;while(r){n=hs((0,Ci.A)((0,ir.A)(n,(e=>e.CATEGORIES))));const e=fs(n,t);t=t.concat(e);if((0,rr.A)(e)){r=false}else{n=e}}return t}function Na(e){(0,tr.A)(e,(e=>{if(!ba(e)){Ia[xa]=e;e.tokenTypeIdx=xa++}if(_a(e)&&!(0,ai.A)(e.CATEGORIES)){e.CATEGORIES=[e.CATEGORIES]}if(!_a(e)){e.CATEGORIES=[]}if(!Oa(e)){e.categoryMatches=[]}if(!Pa(e)){e.categoryMatchesMap={}}}))}function Ca(e){(0,tr.A)(e,(e=>{e.categoryMatches=[];(0,tr.A)(e.categoryMatchesMap,((t,n)=>{e.categoryMatches.push(Ia[n].tokenTypeIdx)}))}))}function $a(e){(0,tr.A)(e,(e=>{La([],e)}))}function La(e,t){(0,tr.A)(e,(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=true}));(0,tr.A)(t.CATEGORIES,(n=>{const r=e.concat(t);if(!hi(r,n)){La(r,n)}}))}function ba(e){return(0,sr.A)(e,"tokenTypeIdx")}function _a(e){return(0,sr.A)(e,"CATEGORIES")}function Oa(e){return(0,sr.A)(e,"categoryMatches")}function Pa(e){return(0,sr.A)(e,"categoryMatchesMap")}function Ma(e){return(0,sr.A)(e,"tokenTypeIdx")}const Da={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,n,r,i){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t},`+` skipped ${n} characters.`}};var Ua;(function(e){e[e["MISSING_PATTERN"]=0]="MISSING_PATTERN";e[e["INVALID_PATTERN"]=1]="INVALID_PATTERN";e[e["EOI_ANCHOR_FOUND"]=2]="EOI_ANCHOR_FOUND";e[e["UNSUPPORTED_FLAGS_FOUND"]=3]="UNSUPPORTED_FLAGS_FOUND";e[e["DUPLICATE_PATTERNS_FOUND"]=4]="DUPLICATE_PATTERNS_FOUND";e[e["INVALID_GROUP_TYPE_FOUND"]=5]="INVALID_GROUP_TYPE_FOUND";e[e["PUSH_MODE_DOES_NOT_EXIST"]=6]="PUSH_MODE_DOES_NOT_EXIST";e[e["MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE"]=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE";e[e["MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY"]=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY";e[e["MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST"]=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST";e[e["LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED"]=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED";e[e["SOI_ANCHOR_FOUND"]=11]="SOI_ANCHOR_FOUND";e[e["EMPTY_MATCH_PATTERN"]=12]="EMPTY_MATCH_PATTERN";e[e["NO_LINE_BREAKS_FLAGS"]=13]="NO_LINE_BREAKS_FLAGS";e[e["UNREACHABLE_PATTERN"]=14]="UNREACHABLE_PATTERN";e[e["IDENTIFY_TERMINATOR"]=15]="IDENTIFY_TERMINATOR";e[e["CUSTOM_LINE_BREAK"]=16]="CUSTOM_LINE_BREAK";e[e["MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"]=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Ua||(Ua={}));const Fa={deferDefinitionErrorsHandling:false,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:false,safeMode:false,errorMessageProvider:Da,traceInitPerf:false,skipValidations:false,recoveryEnabled:true};Object.freeze(Fa);class Ga{constructor(e,t=Fa){this.lexerDefinition=e;this.lexerDefinitionErrors=[];this.lexerDefinitionWarning=[];this.patternIdxToConfig={};this.charCodeToPatternIdxToConfig={};this.modes=[];this.emptyGroups={};this.trackStartLines=true;this.trackEndLines=true;this.hasCustom=false;this.canModeBeOptimized={};this.TRACE_INIT=(e,t)=>{if(this.traceInitPerf===true){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");if(this.traceInitIndent<this.traceInitMaxIdent){console.log(`${n}--\x3e <${e}>`)}const{time:r,value:i}=Ea(t);const s=r>10?console.warn:console.log;if(this.traceInitIndent<this.traceInitMaxIdent){s(`${n}<-- <${e}> time: ${r}ms`)}this.traceInitIndent--;return i}else{return t()}};if(typeof t==="boolean"){throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\n"+"a boolean 2nd argument is no longer supported")}this.config=kr({},Fa,t);const n=this.config.traceInitPerf;if(n===true){this.traceInitMaxIdent=Infinity;this.traceInitPerf=true}else if(typeof n==="number"){this.traceInitMaxIdent=n;this.traceInitPerf=true}this.traceInitIndent=-1;this.TRACE_INIT("Lexer Constructor",(()=>{let n;let r=true;this.TRACE_INIT("Lexer Config handling",(()=>{if(this.config.lineTerminatorsPattern===Fa.lineTerminatorsPattern){this.config.lineTerminatorsPattern=ua}else{if(this.config.lineTerminatorCharacters===Fa.lineTerminatorCharacters){throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n"+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS")}}if(t.safeMode&&t.ensureOptimizations){throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.')}this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking);this.trackEndLines=/full/i.test(this.config.positionTracking);if((0,ai.A)(e)){n={modes:{defaultMode:(0,ar.A)(e)},defaultMode:Os}}else{r=false;n=(0,ar.A)(e)}}));if(this.config.skipValidations===false){this.TRACE_INIT("performRuntimeChecks",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ia(n,this.trackStartLines,this.config.lineTerminatorCharacters))}));this.TRACE_INIT("performWarningRuntimeChecks",(()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(sa(n,this.trackStartLines,this.config.lineTerminatorCharacters))}))}n.modes=n.modes?n.modes:{};(0,tr.A)(n.modes,((e,t)=>{n.modes[t]=zi(e,(e=>(0,Fi.A)(e)))}));const i=(0,Tr.A)(n.modes);(0,tr.A)(n.modes,((e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,(()=>{this.modes.push(n);if(this.config.skipValidations===false){this.TRACE_INIT(`validatePatterns`,(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Gs(e,i))}))}if((0,rr.A)(this.lexerDefinitionErrors)){Sa(e);let r;this.TRACE_INIT(`analyzeTokenTypes`,(()=>{r=Fs(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}));this.patternIdxToConfig[n]=r.patternIdxToConfig;this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig;this.emptyGroups=kr({},this.emptyGroups,r.emptyGroups);this.hasCustom=r.hasCustom||this.hasCustom;this.canModeBeOptimized[n]=r.canBeOptimized}}))}));this.defaultMode=n.defaultMode;if(!(0,rr.A)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=(0,ir.A)(this.lexerDefinitionErrors,(e=>e.message));const t=e.join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+t)}(0,tr.A)(this.lexerDefinitionWarning,(e=>{As(e.message)}));this.TRACE_INIT("Choosing sub-methods implementations",(()=>{if(Ms){this.chopInput=Aa.A;this.match=this.matchWithTest}else{this.updateLastIndex=Ta.A;this.match=this.matchWithExec}if(r){this.handleModes=Ta.A}if(this.trackStartLines===false){this.computeNewColumn=Aa.A}if(this.trackEndLines===false){this.updateTokenEndLineColumnLocation=Ta.A}if(/full/i.test(this.config.positionTracking)){this.createTokenInstance=this.createFullToken}else if(/onlyStart/i.test(this.config.positionTracking)){this.createTokenInstance=this.createStartOnlyToken}else if(/onlyOffset/i.test(this.config.positionTracking)){this.createTokenInstance=this.createOffsetOnlyToken}else{throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`)}if(this.hasCustom){this.addToken=this.addTokenUsingPush;this.handlePayload=this.handlePayloadWithCustom}else{this.addToken=this.addTokenUsingMemberAccess;this.handlePayload=this.handlePayloadNoCustom}}));this.TRACE_INIT("Failed Optimization Warnings",(()=>{const e=(0,Ji.A)(this.canModeBeOptimized,((e,t,n)=>{if(t===false){e.push(n)}return e}),[]);if(t.ensureOptimizations&&!(0,rr.A)(e)){throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n`+'\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n'+"\t Or inspect the console log for details on how to resolve these issues.")}}));this.TRACE_INIT("clearRegExpParserCache",(()=>{Rs()}));this.TRACE_INIT("toFastProperties",(()=>{or(this)}))}))}tokenize(e,t=this.defaultMode){if(!(0,rr.A)(this.lexerDefinitionErrors)){const e=(0,ir.A)(this.lexerDefinitionErrors,(e=>e.message));const t=e.join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+t)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,s,a,o,c,u,l,f,d,h,p,m,g,y;const A=e;const T=A.length;let v=0;let E=0;const R=this.hasCustom?0:Math.floor(e.length/10);const k=new Array(R);const x=[];let I=this.trackStartLines?1:undefined;let S=this.trackStartLines?1:undefined;const w=aa(this.emptyGroups);const N=this.trackStartLines;const C=this.config.lineTerminatorsPattern;let $=0;let L=[];let b=[];const _=[];const O=[];Object.freeze(O);let P;function M(){return L}function D(e){const t=ga(e);const n=b[t];if(n===undefined){return O}else{return n}}const U=e=>{if(_.length===1&&e.tokenType.PUSH_MODE===undefined){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);x.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{_.pop();const e=(0,va.A)(_);L=this.patternIdxToConfig[e];b=this.charCodeToPatternIdxToConfig[e];$=L.length;const t=this.canModeBeOptimized[e]&&this.config.safeMode===false;if(b&&t){P=D}else{P=M}}};function F(e){_.push(e);b=this.charCodeToPatternIdxToConfig[e];L=this.patternIdxToConfig[e];$=L.length;$=L.length;const t=this.canModeBeOptimized[e]&&this.config.safeMode===false;if(b&&t){P=D}else{P=M}}F.call(this,t);let G;const B=this.config.recoveryEnabled;while(v<T){o=null;const t=A.charCodeAt(v);const m=P(t);const R=m.length;for(n=0;n<R;n++){G=m[n];const r=G.pattern;c=null;const l=G.short;if(l!==false){if(t===l){o=r}}else if(G.isCustom===true){y=r.exec(A,v,k,w);if(y!==null){o=y[0];if(y.payload!==undefined){c=y.payload}}else{o=null}}else{this.updateLastIndex(r,v);o=this.match(r,e,v)}if(o!==null){a=G.longerAlt;if(a!==undefined){const t=a.length;for(i=0;i<t;i++){const t=L[a[i]];const n=t.pattern;u=null;if(t.isCustom===true){y=n.exec(A,v,k,w);if(y!==null){s=y[0];if(y.payload!==undefined){u=y.payload}}else{s=null}}else{this.updateLastIndex(n,v);s=this.match(n,e,v)}if(s&&s.length>o.length){o=s;c=u;G=t;break}}}break}}if(o!==null){l=o.length;f=G.group;if(f!==undefined){d=G.tokenTypeIdx;h=this.createTokenInstance(o,v,d,G.tokenType,I,S,l);this.handlePayload(h,c);if(f===false){E=this.addToken(k,E,h)}else{w[f].push(h)}}e=this.chopInput(e,l);v=v+l;S=this.computeNewColumn(S,l);if(N===true&&G.canLineTerminator===true){let e=0;let t;let n;C.lastIndex=0;do{t=C.test(o);if(t===true){n=C.lastIndex-1;e++}}while(t===true);if(e!==0){I=I+e;S=l-n;this.updateTokenEndLineColumnLocation(h,f,n,e,I,S,l)}}this.handleModes(G,U,F,h)}else{const t=v;const n=I;const i=S;let s=B===false;while(s===false&&v<T){e=this.chopInput(e,1);v++;for(r=0;r<$;r++){const t=L[r];const n=t.pattern;const i=t.short;if(i!==false){if(A.charCodeAt(v)===i){s=true}}else if(t.isCustom===true){s=n.exec(A,v,k,w)!==null}else{this.updateLastIndex(n,v);s=n.exec(e)!==null}if(s===true){break}}}p=v-t;S=this.computeNewColumn(S,p);g=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(A,t,p,n,i);x.push({offset:t,line:n,column:i,length:p,message:g});if(B===false){break}}}if(!this.hasCustom){k.length=E}return{tokens:k,groups:w,errors:x}}handleModes(e,t,n,r){if(e.pop===true){const i=e.push;t(r);if(i!==undefined){n.call(this,i)}}else if(e.push!==undefined){n.call(this,e.push)}}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,n,r,i,s,a){let o,c;if(t!==undefined){o=n===a-1;c=o?-1:0;if(!(r===1&&o===true)){e.endLine=i+c;e.endColumn=s-1+-c}}}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,i,s){return{image:e,startOffset:t,startLine:i,startColumn:s,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,i,s,a){return{image:e,startOffset:t,endOffset:t+a-1,startLine:i,endLine:i,startColumn:s,endColumn:s+a-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){e.push(n);return t}addTokenUsingMemberAccess(e,t,n){e[t]=n;t++;return t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){if(t!==null){e.payload=t}}matchWithTest(e,t,n){const r=e.test(t);if(r===true){return t.substring(n,e.lastIndex)}return null}matchWithExec(e,t){const n=e.exec(t);return n!==null?n[0]:null}}Ga.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will"+"be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";Ga.NA=/NOT_APPLICABLE/;function Ba(e){if(ja(e)){return e.LABEL}else{return e.name}}function Ka(e){return e.name}function ja(e){return(0,hr.A)(e.LABEL)&&e.LABEL!==""}const Va="parent";const Wa="categories";const Ha="label";const za="group";const qa="push_mode";const Ya="pop_mode";const Xa="longer_alt";const Qa="line_breaks";const Ja="start_chars_hint";function Za(e){return eo(e)}function eo(e){const t=e.pattern;const n={};n.name=e.name;if(!(0,Fi.A)(t)){n.PATTERN=t}if((0,sr.A)(e,Va)){throw"The parent property is no longer supported.\n"+"See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details."}if((0,sr.A)(e,Wa)){n.CATEGORIES=e[Wa]}Sa([n]);if((0,sr.A)(e,Ha)){n.LABEL=e[Ha]}if((0,sr.A)(e,za)){n.GROUP=e[za]}if((0,sr.A)(e,Ya)){n.POP_MODE=e[Ya]}if((0,sr.A)(e,qa)){n.PUSH_MODE=e[qa]}if((0,sr.A)(e,Xa)){n.LONGER_ALT=e[Xa]}if((0,sr.A)(e,Qa)){n.LINE_BREAKS=e[Qa]}if((0,sr.A)(e,Ja)){n.START_CHARS_HINT=e[Ja]}return n}const to=Za({name:"EOF",pattern:Ga.NA});Sa([to]);function no(e,t,n,r,i,s,a,o){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:a,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function ro(e,t){return Ra(e,t)}const io={buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:r}){const i=ja(e);const s=i?`--\x3e ${Ba(e)} <--`:`token of type --\x3e ${e.name} <--`;const a=`Expecting ${s} but found --\x3e '${t.image}' <--`;return a},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ";const a=ms(t).image;const o="\nbut found: '"+a+"'";if(r){return s+r+o}else{const t=(0,Ji.A)(e,((e,t)=>e.concat(t)),[]);const n=(0,ir.A)(t,(e=>`[${(0,ir.A)(e,(e=>Ba(e))).join(", ")}]`));const r=(0,ir.A)(n,((e,t)=>` ${t+1}. ${e}`));const i=`one of these possible Token sequences:\n${r.join("\n")}`;return s+i+o}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){const i="Expecting: ";const s=ms(t).image;const a="\nbut found: '"+s+"'";if(n){return i+n+a}else{const t=(0,ir.A)(e,(e=>`[${(0,ir.A)(e,(e=>Ba(e))).join(",")}]`));const n=`expecting at least one iteration which starts with one of these possible Token sequences::\n `+`<${t.join(" ,")}>`;return i+n+a}}};Object.freeze(io);const so={buildRuleNotFoundError(e,t){const n="Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\n"+"inside top level rule: ->"+e.name+"<-";return n}};const ao={buildDuplicateFoundError(e,t){function n(e){if(e instanceof Jr){return e.terminalType.name}else if(e instanceof jr){return e.nonTerminalName}else{return""}}const r=e.name;const i=ms(t);const s=i.idx;const a=ki(i);const o=n(i);const c=s>0;let u=`->${a}${c?s:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${r}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;u=u.replace(/[ \t]+/g," ");u=u.replace(/\s\s+/g,"\n");return u},buildNamespaceConflictError(e){const t=`Namespace conflict found in grammar.\n`+`The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\n`+`To resolve this make sure each Terminal and Non-Terminal names are unique\n`+`This is easy to accomplish by using the convention that Terminal names start with an uppercase letter\n`+`and Non-Terminal names start with a lower case letter.`;return t},buildAlternationPrefixAmbiguityError(e){const t=(0,ir.A)(e.prefixPath,(e=>Ba(e))).join(", ");const n=e.alternation.idx===0?"":e.alternation.idx;const r=`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\n`+`in <OR${n}> inside <${e.topLevelRule.name}> Rule,\n`+`<${t}> may appears as a prefix path in all these alternatives.\n`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\n`+`For Further details.`;return r},buildAlternationAmbiguityError(e){const t=(0,ir.A)(e.prefixPath,(e=>Ba(e))).join(", ");const n=e.alternation.idx===0?"":e.alternation.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${n}>`+` inside <${e.topLevelRule.name}> Rule,\n`+`<${t}> may appears as a prefix path in all these alternatives.\n`;r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\n`+`For Further details.`;return r},buildEmptyRepetitionError(e){let t=ki(e.repetition);if(e.repetition.idx!==0){t+=e.repetition.idx}const n=`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\n`+`This could lead to an infinite loop.`;return n},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){const t=`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}>`+` in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n`+`Only the last alternative may be an empty alternative.`;return t},buildTooManyAlternativesError(e){const t=`An Alternation cannot have more than 256 alternatives:\n`+`<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`;return t},buildLeftRecursionError(e){const t=e.topLevelRule.name;const n=(0,ir.A)(e.leftRecursionPath,(e=>e.name));const r=`${t} --\x3e ${n.concat([t]).join(" --\x3e ")}`;const i=`Left Recursion found in grammar.\n`+`rule: <${t}> can be invoked from itself (directly or indirectly)\n`+`without consuming any Tokens. The grammar path that causes this is: \n ${r}\n`+` To fix this refactor your grammar to remove the left recursion.\n`+`see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`;return i},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;if(e.topLevelRule instanceof Vr){t=e.topLevelRule.name}else{t=e.topLevelRule}const n=`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`;return n}};function oo(e,t){const n=new co(e,t);n.resolveRefs();return n.errors}class co extends ti{constructor(e,t){super();this.nameToTopRule=e;this.errMsgProvider=t;this.errors=[]}resolveRefs(){(0,tr.A)((0,nr.A)(this.nameToTopRule),(e=>{this.currTopLevel=e;e.accept(this)}))}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(!t){const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Ou.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}else{e.referencedRule=t}}}function uo(e,t){return(0,os.A)((0,ir.A)(e,t),1)}const lo=uo;var fo=n(48657);function ho(e,t,n,r){var i=-1,s=e==null?0:e.length;while(++i<s){var a=e[i];t(r,a,n(a),e)}return r}const po=ho;function mo(e,t,n,r){(0,ri.A)(e,(function(e,i,s){t(r,e,n(e),s)}));return r}const go=mo;function yo(e,t){return function(n,r){var i=(0,ai.A)(n)?po:go,s=t?t():{};return i(n,e,(0,Ir.A)(r,2),s)}}const Ao=yo;var To=Object.prototype;var vo=To.hasOwnProperty;var Eo=Ao((function(e,t,n){if(vo.call(e,n)){e[n].push(t)}else{(0,fo.A)(e,n,[t])}}));const Ro=Eo;function ko(e,t,n){var r=e==null?0:e.length;if(!r){return[]}t=n||t===undefined?1:(0,lr.A)(t);t=r-t;return ur(e,0,t<0?0:t)}const xo=ko;class Io extends xi{constructor(e,t){super();this.topProd=e;this.path=t;this.possibleTokTypes=[];this.nextProductionName="";this.nextProductionOccurrence=0;this.found=false;this.isAtEndOfPath=false}startWalking(){this.found=false;if(this.path.ruleStack[0]!==this.topProd.name){throw Error("The path does not start with the walker's top Rule!")}this.ruleStack=(0,ar.A)(this.path.ruleStack).reverse();this.occurrenceStack=(0,ar.A)(this.path.occurrenceStack).reverse();this.ruleStack.pop();this.occurrenceStack.pop();this.updateExpectedNext();this.walk(this.topProd);return this.possibleTokTypes}walk(e,t=[]){if(!this.found){super.walk(e,t)}}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const r=t.concat(n);this.updateExpectedNext();this.walk(e.referencedRule,r)}}updateExpectedNext(){if((0,rr.A)(this.ruleStack)){this.nextProductionName="";this.nextProductionOccurrence=0;this.isAtEndOfPath=true}else{this.nextProductionName=this.ruleStack.pop();this.nextProductionOccurrence=this.occurrenceStack.pop()}}}class So extends Io{constructor(e,t){super(e,t);this.path=t;this.nextTerminalName="";this.nextTerminalOccurrence=0;this.nextTerminalName=this.path.lastTok.name;this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const e=t.concat(n);const r=new Wr({definition:e});this.possibleTokTypes=$i(r);this.found=true}}}class wo extends xi{constructor(e,t){super();this.topRule=e;this.occurrence=t;this.result={token:undefined,occurrence:undefined,isEndOfRule:undefined}}startWalking(){this.walk(this.topRule);return this.result}}class No extends wo{walkMany(e,t,n){if(e.idx===this.occurrence){const e=ms(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof Jr){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkMany(e,t,n)}}}class Co extends wo{walkManySep(e,t,n){if(e.idx===this.occurrence){const e=ms(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof Jr){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkManySep(e,t,n)}}}class $o extends wo{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){const e=ms(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof Jr){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkAtLeastOne(e,t,n)}}}class Lo extends wo{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){const e=ms(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof Jr){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkAtLeastOneSep(e,t,n)}}}function bo(e,t,n=[]){n=(0,ar.A)(n);let r=[];let i=0;function s(t){return t.concat(dr(e,i+1))}function a(e){const i=bo(s(e),t,n);return r.concat(i)}while(n.length<t&&i<e.length){const t=e[i];if(t instanceof Wr){return a(t.definition)}else if(t instanceof jr){return a(t.definition)}else if(t instanceof Hr){r=a(t.definition)}else if(t instanceof zr){const e=t.definition.concat([new Yr({definition:t.definition})]);return a(e)}else if(t instanceof qr){const e=[new Wr({definition:t.definition}),new Yr({definition:[new Jr({terminalType:t.separator})].concat(t.definition)})];return a(e)}else if(t instanceof Xr){const e=t.definition.concat([new Yr({definition:[new Jr({terminalType:t.separator})].concat(t.definition)})]);r=a(e)}else if(t instanceof Yr){const e=t.definition.concat([new Yr({definition:t.definition})]);r=a(e)}else if(t instanceof Qr){(0,tr.A)(t.definition,(e=>{if((0,rr.A)(e.definition)===false){r=a(e.definition)}}));return r}else if(t instanceof Jr){n.push(t.terminalType)}else{throw Error("non exhaustive match")}i++}r.push({partialPath:n,suffixDef:dr(e,i)});return r}function _o(e,t,n,r){const i="EXIT_NONE_TERMINAL";const s=[i];const a="EXIT_ALTERNATIVE";let o=false;const c=t.length;const u=c-r-1;const l=[];const f=[];f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});while(!(0,rr.A)(f)){const e=f.pop();if(e===a){if(o&&(0,va.A)(f).idx<=u){f.pop()}continue}const r=e.def;const d=e.idx;const h=e.ruleStack;const p=e.occurrenceStack;if((0,rr.A)(r)){continue}const m=r[0];if(m===i){const e={idx:d,def:dr(r),ruleStack:xo(h),occurrenceStack:xo(p)};f.push(e)}else if(m instanceof Jr){if(d<c-1){const e=d+1;const i=t[e];if(n(i,m.terminalType)){const t={idx:e,def:dr(r),ruleStack:h,occurrenceStack:p};f.push(t)}}else if(d===c-1){l.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:h,occurrenceStack:p});o=true}else{throw Error("non exhaustive match")}}else if(m instanceof jr){const e=(0,ar.A)(h);e.push(m.nonTerminalName);const t=(0,ar.A)(p);t.push(m.idx);const n={idx:d,def:m.definition.concat(s,dr(r)),ruleStack:e,occurrenceStack:t};f.push(n)}else if(m instanceof Hr){const e={idx:d,def:dr(r),ruleStack:h,occurrenceStack:p};f.push(e);f.push(a);const t={idx:d,def:m.definition.concat(dr(r)),ruleStack:h,occurrenceStack:p};f.push(t)}else if(m instanceof zr){const e=new Yr({definition:m.definition,idx:m.idx});const t=m.definition.concat([e],dr(r));const n={idx:d,def:t,ruleStack:h,occurrenceStack:p};f.push(n)}else if(m instanceof qr){const e=new Jr({terminalType:m.separator});const t=new Yr({definition:[e].concat(m.definition),idx:m.idx});const n=m.definition.concat([t],dr(r));const i={idx:d,def:n,ruleStack:h,occurrenceStack:p};f.push(i)}else if(m instanceof Xr){const e={idx:d,def:dr(r),ruleStack:h,occurrenceStack:p};f.push(e);f.push(a);const t=new Jr({terminalType:m.separator});const n=new Yr({definition:[t].concat(m.definition),idx:m.idx});const i=m.definition.concat([n],dr(r));const s={idx:d,def:i,ruleStack:h,occurrenceStack:p};f.push(s)}else if(m instanceof Yr){const e={idx:d,def:dr(r),ruleStack:h,occurrenceStack:p};f.push(e);f.push(a);const t=new Yr({definition:m.definition,idx:m.idx});const n=m.definition.concat([t],dr(r));const i={idx:d,def:n,ruleStack:h,occurrenceStack:p};f.push(i)}else if(m instanceof Qr){for(let e=m.definition.length-1;e>=0;e--){const t=m.definition[e];const n={idx:d,def:t.definition.concat(dr(r)),ruleStack:h,occurrenceStack:p};f.push(n);f.push(a)}}else if(m instanceof Wr){f.push({idx:d,def:m.definition.concat(dr(r)),ruleStack:h,occurrenceStack:p})}else if(m instanceof Vr){f.push(Oo(m,d,h,p))}else{throw Error("non exhaustive match")}}return l}function Oo(e,t,n,r){const i=(0,ar.A)(n);i.push(e.name);const s=(0,ar.A)(r);s.push(1);return{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var Po;(function(e){e[e["OPTION"]=0]="OPTION";e[e["REPETITION"]=1]="REPETITION";e[e["REPETITION_MANDATORY"]=2]="REPETITION_MANDATORY";e[e["REPETITION_MANDATORY_WITH_SEPARATOR"]=3]="REPETITION_MANDATORY_WITH_SEPARATOR";e[e["REPETITION_WITH_SEPARATOR"]=4]="REPETITION_WITH_SEPARATOR";e[e["ALTERNATION"]=5]="ALTERNATION"})(Po||(Po={}));function Mo(e){if(e instanceof Hr||e==="Option"){return Po.OPTION}else if(e instanceof Yr||e==="Repetition"){return Po.REPETITION}else if(e instanceof zr||e==="RepetitionMandatory"){return Po.REPETITION_MANDATORY}else if(e instanceof qr||e==="RepetitionMandatoryWithSeparator"){return Po.REPETITION_MANDATORY_WITH_SEPARATOR}else if(e instanceof Xr||e==="RepetitionWithSeparator"){return Po.REPETITION_WITH_SEPARATOR}else if(e instanceof Qr||e==="Alternation"){return Po.ALTERNATION}else{throw Error("non exhaustive match")}}function Do(e){const{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e;const s=Mo(r);if(s===Po.ALTERNATION){return qo(t,n,i)}else{return Yo(t,n,s,i)}}function Uo(e,t,n,r,i,s){const a=qo(e,t,n);const o=Jo(a)?ka:Ra;return s(a,r,o,i)}function Fo(e,t,n,r,i,s){const a=Yo(e,t,i,n);const o=Jo(a)?ka:Ra;return s(a[0],o,r)}function Go(e,t,n,r){const i=e.length;const s=Ti(e,(e=>Ti(e,(e=>e.length===1))));if(t){return function(t){const r=(0,ir.A)(t,(e=>e.GATE));for(let s=0;s<i;s++){const t=e[s];const i=t.length;const a=r[s];if(a!==undefined&&a.call(this)===false){continue}e:for(let e=0;e<i;e++){const r=t[e];const i=r.length;for(let e=0;e<i;e++){const t=this.LA(e+1);if(n(t,r[e])===false){continue e}}return s}}return undefined}}else if(s&&!r){const t=(0,ir.A)(e,(e=>(0,Ci.A)(e)));const n=(0,Ji.A)(t,((e,t,n)=>{(0,tr.A)(t,(t=>{if(!(0,sr.A)(e,t.tokenTypeIdx)){e[t.tokenTypeIdx]=n}(0,tr.A)(t.categoryMatches,(t=>{if(!(0,sr.A)(e,t)){e[t]=n}}))}));return e}),{});return function(){const e=this.LA(1);return n[e.tokenTypeIdx]}}else{return function(){for(let t=0;t<i;t++){const r=e[t];const i=r.length;e:for(let e=0;e<i;e++){const i=r[e];const s=i.length;for(let e=0;e<s;e++){const t=this.LA(e+1);if(n(t,i[e])===false){continue e}}return t}}return undefined}}}function Bo(e,t,n){const r=Ti(e,(e=>e.length===1));const i=e.length;if(r&&!n){const t=(0,Ci.A)(e);if(t.length===1&&(0,rr.A)(t[0].categoryMatches)){const e=t[0];const n=e.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===n}}else{const e=(0,Ji.A)(t,((e,t,n)=>{e[t.tokenTypeIdx]=true;(0,tr.A)(t.categoryMatches,(t=>{e[t]=true}));return e}),[]);return function(){const t=this.LA(1);return e[t.tokenTypeIdx]===true}}}else{return function(){e:for(let n=0;n<i;n++){const r=e[n];const i=r.length;for(let e=0;e<i;e++){const n=this.LA(e+1);if(t(n,r[e])===false){continue e}}return true}return false}}}class Ko extends xi{constructor(e,t,n){super();this.topProd=e;this.targetOccurrence=t;this.targetProdType=n}startWalking(){this.walk(this.topProd);return this.restDef}checkIsTarget(e,t,n,r){if(e.idx===this.targetOccurrence&&this.targetProdType===t){this.restDef=n.concat(r);return true}return false}walkOption(e,t,n){if(!this.checkIsTarget(e,Po.OPTION,t,n)){super.walkOption(e,t,n)}}walkAtLeastOne(e,t,n){if(!this.checkIsTarget(e,Po.REPETITION_MANDATORY,t,n)){super.walkOption(e,t,n)}}walkAtLeastOneSep(e,t,n){if(!this.checkIsTarget(e,Po.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)){super.walkOption(e,t,n)}}walkMany(e,t,n){if(!this.checkIsTarget(e,Po.REPETITION,t,n)){super.walkOption(e,t,n)}}walkManySep(e,t,n){if(!this.checkIsTarget(e,Po.REPETITION_WITH_SEPARATOR,t,n)){super.walkOption(e,t,n)}}}class jo extends ti{constructor(e,t,n){super();this.targetOccurrence=e;this.targetProdType=t;this.targetRef=n;this.result=[]}checkIsTarget(e,t){if(e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===undefined||e===this.targetRef)){this.result=e.definition}}visitOption(e){this.checkIsTarget(e,Po.OPTION)}visitRepetition(e){this.checkIsTarget(e,Po.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Po.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Po.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Po.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Po.ALTERNATION)}}function Vo(e){const t=new Array(e);for(let n=0;n<e;n++){t[n]=[]}return t}function Wo(e){let t=[""];for(let n=0;n<e.length;n++){const r=e[n];const i=[];for(let e=0;e<t.length;e++){const n=t[e];i.push(n+"_"+r.tokenTypeIdx);for(let e=0;e<r.categoryMatches.length;e++){const t="_"+r.categoryMatches[e];i.push(n+t)}}t=i}return t}function Ho(e,t,n){for(let r=0;r<e.length;r++){if(r===n){continue}const i=e[r];for(let e=0;e<t.length;e++){const n=t[e];if(i[n]===true){return false}}}return true}function zo(e,t){const n=(0,ir.A)(e,(e=>bo([e],1)));const r=Vo(n.length);const i=(0,ir.A)(n,(e=>{const t={};(0,tr.A)(e,(e=>{const n=Wo(e.partialPath);(0,tr.A)(n,(e=>{t[e]=true}))}));return t}));let s=n;for(let a=1;a<=t;a++){const e=s;s=Vo(e.length);for(let n=0;n<e.length;n++){const o=e[n];for(let e=0;e<o.length;e++){const c=o[e].partialPath;const u=o[e].suffixDef;const l=Wo(c);const f=Ho(i,l,n);if(f||(0,rr.A)(u)||c.length===t){const e=r[n];if(Xo(e,c)===false){e.push(c);for(let e=0;e<l.length;e++){const t=l[e];i[n][t]=true}}}else{const e=bo(u,a+1,c);s[n]=s[n].concat(e);(0,tr.A)(e,(e=>{const t=Wo(e.partialPath);(0,tr.A)(t,(e=>{i[n][e]=true}))}))}}}}return r}function qo(e,t,n,r){const i=new jo(e,Po.ALTERNATION,r);t.accept(i);return zo(i.result,n)}function Yo(e,t,n,r){const i=new jo(e,n);t.accept(i);const s=i.result;const a=new Ko(t,e,n);const o=a.startWalking();const c=new Wr({definition:s});const u=new Wr({definition:o});return zo([c,u],r)}function Xo(e,t){e:for(let n=0;n<e.length;n++){const r=e[n];if(r.length!==t.length){continue}for(let e=0;e<r.length;e++){const n=t[e];const i=r[e];const s=n===i||i.categoryMatchesMap[n.tokenTypeIdx]!==undefined;if(s===false){continue e}}return true}return false}function Qo(e,t){return e.length<t.length&&Ti(e,((e,n)=>{const r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]}))}function Jo(e){return Ti(e,(e=>Ti(e,(e=>Ti(e,(e=>(0,rr.A)(e.categoryMatches)))))))}function Zo(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return(0,ir.A)(t,(e=>Object.assign({type:Ou.CUSTOM_LOOKAHEAD_VALIDATION},e)))}function ec(e,t,n,r){const i=lo(e,(e=>tc(e,n)));const s=yc(e,t,n);const a=lo(e,(e=>hc(e,n)));const o=lo(e,(t=>sc(t,e,r,n)));return i.concat(s,a,o)}function tc(e,t){const n=new ic;e.accept(n);const r=n.allProductions;const i=Ro(r,nc);const s=Cr(i,(e=>e.length>1));const a=(0,ir.A)((0,nr.A)(s),(n=>{const r=ms(n);const i=t.buildDuplicateFoundError(e,n);const s=ki(r);const a={message:i,type:Ou.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:s,occurrence:r.idx};const o=rc(r);if(o){a.parameter=o}return a}));return a}function nc(e){return`${ki(e)}_#_${e.idx}_#_${rc(e)}`}function rc(e){if(e instanceof Jr){return e.terminalType.name}else if(e instanceof jr){return e.nonTerminalName}else{return""}}class ic extends ti{constructor(){super(...arguments);this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function sc(e,t,n,r){const i=[];const s=(0,Ji.A)(t,((t,n)=>{if(n.name===e.name){return t+1}return t}),0);if(s>1){const t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:Ou.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function ac(e,t,n){const r=[];let i;if(!hi(t,e)){i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-`+`as it is not defined in any of the super grammars `;r.push({message:i,type:Ou.INVALID_RULE_OVERRIDE,ruleName:e})}return r}function oc(e,t,n,r=[]){const i=[];const s=cc(t.definition);if((0,rr.A)(s)){return[]}else{const t=e.name;const a=hi(s,e);if(a){i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Ou.LEFT_RECURSION,ruleName:t})}const o=fs(s,r.concat([e]));const c=lo(o,(t=>{const i=(0,ar.A)(r);i.push(t);return oc(e,t,n,i)}));return i.concat(c)}}function cc(e){let t=[];if((0,rr.A)(e)){return t}const n=ms(e);if(n instanceof jr){t.push(n.referencedRule)}else if(n instanceof Wr||n instanceof Hr||n instanceof zr||n instanceof qr||n instanceof Xr||n instanceof Yr){t=t.concat(cc(n.definition))}else if(n instanceof Qr){t=(0,Ci.A)((0,ir.A)(n.definition,(e=>cc(e.definition))))}else if(n instanceof Jr){}else{throw Error("non exhaustive match")}const r=Ei(n);const i=e.length>1;if(r&&i){const n=dr(e);return t.concat(cc(n))}else{return t}}class uc extends ti{constructor(){super(...arguments);this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function lc(e,t){const n=new uc;e.accept(n);const r=n.alternations;const i=lo(r,(n=>{const r=xo(n.definition);return lo(r,((r,i)=>{const s=_o([r],[],Ra,1);if((0,rr.A)(s)){return[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:Ou.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]}else{return[]}}))}));return i}function fc(e,t,n){const r=new uc;e.accept(r);let i=r.alternations;i=zi(i,(e=>e.ignoreAmbiguities===true));const s=lo(i,(r=>{const i=r.idx;const s=r.maxLookahead||t;const a=qo(i,e,s,r);const o=mc(a,r,e,n);const c=gc(a,r,e,n);return o.concat(c)}));return s}class dc extends ti{constructor(){super(...arguments);this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function hc(e,t){const n=new uc;e.accept(n);const r=n.alternations;const i=lo(r,(n=>{if(n.definition.length>255){return[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Ou.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]}else{return[]}}));return i}function pc(e,t,n){const r=[];(0,tr.A)(e,(e=>{const i=new dc;e.accept(i);const s=i.allProductions;(0,tr.A)(s,(i=>{const s=Mo(i);const a=i.maxLookahead||t;const o=i.idx;const c=Yo(o,e,s,a);const u=c[0];if((0,rr.A)((0,Ci.A)(u))){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:Ou.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))}));return r}function mc(e,t,n,r){const i=[];const s=(0,Ji.A)(e,((n,r,s)=>{if(t.definition[s].ignoreAmbiguities===true){return n}(0,tr.A)(r,(r=>{const a=[s];(0,tr.A)(e,((e,n)=>{if(s!==n&&Xo(e,r)&&t.definition[n].ignoreAmbiguities!==true){a.push(n)}}));if(a.length>1&&!Xo(i,r)){i.push(r);n.push({alts:a,path:r})}}));return n}),[]);const a=(0,ir.A)(s,(e=>{const i=(0,ir.A)(e.alts,(e=>e+1));const s=r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path});return{message:s,type:Ou.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}}));return a}function gc(e,t,n,r){const i=(0,Ji.A)(e,((e,t,n)=>{const r=(0,ir.A)(t,(e=>({idx:n,path:e})));return e.concat(r)}),[]);const s=hs(lo(i,(e=>{const s=t.definition[e.idx];if(s.ignoreAmbiguities===true){return[]}const a=e.idx;const o=e.path;const c=(0,Zi.A)(i,(e=>t.definition[e.idx].ignoreAmbiguities!==true&&e.idx<a&&Qo(e.path,o)));const u=(0,ir.A)(c,(e=>{const i=[e.idx+1,a+1];const s=t.idx===0?"":t.idx;const o=r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path});return{message:o,type:Ou.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:s,alternatives:i}}));return u})));return s}function yc(e,t,n){const r=[];const i=(0,ir.A)(t,(e=>e.name));(0,tr.A)(e,(e=>{const t=e.name;if(hi(i,t)){const i=n.buildNamespaceConflictError(e);r.push({message:i,type:Ou.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}));return r}function Ac(e){const t=(0,Gi.A)(e,{errMsgProvider:so});const n={};(0,tr.A)(e.rules,(e=>{n[e.name]=e}));return oo(n,t.errMsgProvider)}function Tc(e){e=(0,Gi.A)(e,{errMsgProvider:ao});return ec(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}const vc="MismatchedTokenException";const Ec="NoViableAltException";const Rc="EarlyExitException";const kc="NotAllInputParsedException";const xc=[vc,Ec,Rc,kc];Object.freeze(xc);function Ic(e){return hi(xc,e.name)}class Sc extends Error{constructor(e,t){super(e);this.token=t;this.resyncedTokens=[];Object.setPrototypeOf(this,new.target.prototype);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}}class wc extends Sc{constructor(e,t,n){super(e,t);this.previousToken=n;this.name=vc}}class Nc extends Sc{constructor(e,t,n){super(e,t);this.previousToken=n;this.name=Ec}}class Cc extends Sc{constructor(e,t){super(e,t);this.name=kc}}class $c extends Sc{constructor(e,t,n){super(e,t);this.previousToken=n;this.name=Rc}}const Lc={};const bc="InRuleRecoveryException";class _c extends Error{constructor(e){super(e);this.name=bc}}class Oc{initRecoverable(e){this.firstAfterRepMap={};this.resyncFollows={};this.recoveryEnabled=(0,sr.A)(e,"recoveryEnabled")?e.recoveryEnabled:bu.recoveryEnabled;if(this.recoveryEnabled){this.attemptInRepetitionRecovery=Pc}}getTokenToInsert(e){const t=no(e,"",NaN,NaN,NaN,NaN,NaN,NaN);t.isInsertedInRecovery=true;return t}canTokenTypeBeInsertedInRecovery(e){return true}canTokenTypeBeDeletedInRecovery(e){return true}tryInRepetitionRecovery(e,t,n,r){const i=this.findReSyncTokenType();const s=this.exportLexerState();const a=[];let o=false;const c=this.LA(1);let u=this.LA(1);const l=()=>{const e=this.LA(0);const t=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:this.getCurrRuleFullName()});const n=new wc(t,c,this.LA(0));n.resyncedTokens=xo(a);this.SAVE_ERROR(n)};while(!o){if(this.tokenMatcher(u,r)){l();return}else if(n.call(this)){l();e.apply(this,t);return}else if(this.tokenMatcher(u,i)){o=true}else{u=this.SKIP_TOKEN();this.addToResyncTokens(u,a)}}this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,n){if(n===false){return false}if(this.tokenMatcher(this.LA(1),e)){return false}if(this.isBackTracking()){return false}if(this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))){return false}return true}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);const r=this.getNextPossibleTokenTypes(n);return r}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){const t=this.getTokenToInsert(e);return t}if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();this.consumeToken();return e}throw new _c("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)){return false}if((0,rr.A)(t)){return false}const n=this.LA(1);const r=(0,gs.A)(t,(e=>this.tokenMatcher(n,e)))!==undefined;return r}canRecoverWithSingleTokenDeletion(e){if(!this.canTokenTypeBeDeletedInRecovery(e)){return false}const t=this.tokenMatcher(this.LA(2),e);return t}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey();const n=this.getFollowSetFromFollowKey(t);return hi(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1);let n=2;while(true){const r=(0,gs.A)(e,(e=>{const n=ro(t,e);return n}));if(r!==undefined){return r}t=this.LA(n);n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1){return Lc}const e=this.getLastExplicitRuleShortName();const t=this.getLastExplicitRuleOccurrenceIndex();const n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK;const t=this.RULE_OCCURRENCE_STACK;return(0,ir.A)(e,((n,r)=>{if(r===0){return Lc}return{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])}}))}flattenFollowSet(){const e=(0,ir.A)(this.buildFullFollowKeyStack(),(e=>this.getFollowSetFromFollowKey(e)));return(0,Ci.A)(e)}getFollowSetFromFollowKey(e){if(e===Lc){return[to]}const t=e.ruleName+e.idxInCallingRule+Oi+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){if(!this.tokenMatcher(e,to)){t.push(e)}return t}reSyncTo(e){const t=[];let n=this.LA(1);while(this.tokenMatcher(n,e)===false){n=this.SKIP_TOKEN();this.addToResyncTokens(n,t)}return xo(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,a){}getCurrentGrammarPath(e,t){const n=this.getHumanReadableRuleStack();const r=(0,ar.A)(this.RULE_OCCURRENCE_STACK);const i={ruleStack:n,occurrenceStack:r,lastTok:e,lastTokOccurrence:t};return i}getHumanReadableRuleStack(){return(0,ir.A)(this.RULE_STACK,(e=>this.shortRuleNameToFullName(e)))}}function Pc(e,t,n,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[o];if(c===undefined){const e=this.getCurrRuleFullName();const t=this.getGAstProductions()[e];const n=new s(t,i);c=n.startWalking();this.firstAfterRepMap[o]=c}let u=c.token;let l=c.occurrence;const f=c.isEndOfRule;if(this.RULE_STACK.length===1&&f&&u===undefined){u=to;l=1}if(u===undefined||l===undefined){return}if(this.shouldInRepetitionRecoveryBeTried(u,l,a)){this.tryInRepetitionRecovery(e,t,n,u)}}const Mc=4;const Dc=8;const Uc=12;const Fc=8;const Gc=1<<Dc;const Bc=2<<Dc;const Kc=3<<Dc;const jc=4<<Dc;const Vc=5<<Dc;const Wc=6<<Dc;function Hc(e,t,n){return n|t|e}const zc=32-Fc;class qc{constructor(e){var t;this.maxLookahead=(t=e===null||e===void 0?void 0:e.maxLookahead)!==null&&t!==void 0?t:bu.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if((0,rr.A)(t)){const n=this.validateEmptyOrAlternatives(e.rules);const r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead);const i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);const s=[...t,...n,...r,...i];return s}return t}validateNoLeftRecursion(e){return lo(e,(e=>oc(e,e,ao)))}validateEmptyOrAlternatives(e){return lo(e,(e=>lc(e,ao)))}validateAmbiguousAlternationAlternatives(e,t){return lo(e,(e=>fc(e,t,ao)))}validateSomeNonEmptyLookaheadPath(e,t){return pc(e,t,ao)}buildLookaheadForAlternation(e){return Uo(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Go)}buildLookaheadForOptional(e){return Fo(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Mo(e.prodType),Bo)}}class Yc{initLooksAhead(e){this.dynamicTokensEnabled=(0,sr.A)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:bu.dynamicTokensEnabled;this.maxLookahead=(0,sr.A)(e,"maxLookahead")?e.maxLookahead:bu.maxLookahead;this.lookaheadStrategy=(0,sr.A)(e,"lookaheadStrategy")?e.lookaheadStrategy:new qc({maxLookahead:this.maxLookahead});this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){(0,tr.A)(e,(e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,(()=>{const{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:a}=Jc(e);(0,tr.A)(t,(t=>{const n=t.idx===0?"":t.idx;this.TRACE_INIT(`${ki(t)}${n}`,(()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled});const r=Hc(this.fullRuleNameToShort[e.name],Gc,t.idx);this.setLaFuncCache(r,n)}))}));(0,tr.A)(n,(t=>{this.computeLookaheadFunc(e,t.idx,Kc,"Repetition",t.maxLookahead,ki(t))}));(0,tr.A)(r,(t=>{this.computeLookaheadFunc(e,t.idx,Bc,"Option",t.maxLookahead,ki(t))}));(0,tr.A)(i,(t=>{this.computeLookaheadFunc(e,t.idx,jc,"RepetitionMandatory",t.maxLookahead,ki(t))}));(0,tr.A)(s,(t=>{this.computeLookaheadFunc(e,t.idx,Wc,"RepetitionMandatoryWithSeparator",t.maxLookahead,ki(t))}));(0,tr.A)(a,(t=>{this.computeLookaheadFunc(e,t.idx,Vc,"RepetitionWithSeparator",t.maxLookahead,ki(t))}))}))}))}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${t===0?"":t}`,(()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r});const a=Hc(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(a,s)}))}getKeyForAutomaticLookahead(e,t){const n=this.getLastExplicitRuleShortName();return Hc(n,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}}class Xc extends ti{constructor(){super(...arguments);this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}}const Qc=new Xc;function Jc(e){Qc.reset();e.accept(Qc);const t=Qc.dslMethods;Qc.reset();return t}function Zc(e,t){if(isNaN(e.startOffset)===true){e.startOffset=t.startOffset;e.endOffset=t.endOffset}else if(e.endOffset<t.endOffset===true){e.endOffset=t.endOffset}}function eu(e,t){if(isNaN(e.startOffset)===true){e.startOffset=t.startOffset;e.startColumn=t.startColumn;e.startLine=t.startLine;e.endOffset=t.endOffset;e.endColumn=t.endColumn;e.endLine=t.endLine}else if(e.endOffset<t.endOffset===true){e.endOffset=t.endOffset;e.endColumn=t.endColumn;e.endLine=t.endLine}}function tu(e,t,n){if(e.children[n]===undefined){e.children[n]=[t]}else{e.children[n].push(t)}}function nu(e,t,n){if(e.children[t]===undefined){e.children[t]=[n]}else{e.children[t].push(n)}}const ru="name";function iu(e,t){Object.defineProperty(e,ru,{enumerable:false,configurable:true,writable:false,value:t})}function su(e,t){const n=(0,Tr.A)(e);const r=n.length;for(let i=0;i<r;i++){const r=n[i];const s=e[r];const a=s.length;for(let e=0;e<a;e++){const n=s[e];if(n.tokenTypeIdx===undefined){this[n.name](n.children,t)}}}}function au(e,t){const n=function(){};iu(n,e+"BaseSemantics");const r={visit:function(e,t){if((0,ai.A)(e)){e=e[0]}if((0,Fi.A)(e)){return undefined}return this[e.name](e.children,t)},validateVisitor:function(){const e=uu(this,t);if(!(0,rr.A)(e)){const t=(0,ir.A)(e,(e=>e.msg));throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t`+`${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};n.prototype=r;n.prototype.constructor=n;n._RULE_NAMES=t;return n}function ou(e,t,n){const r=function(){};iu(r,e+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);(0,tr.A)(t,(e=>{i[e]=su}));r.prototype=i;r.prototype.constructor=r;return r}var cu;(function(e){e[e["REDUNDANT_METHOD"]=0]="REDUNDANT_METHOD";e[e["MISSING_METHOD"]=1]="MISSING_METHOD"})(cu||(cu={}));function uu(e,t){const n=lu(e,t);return n}function lu(e,t){const n=(0,Zi.A)(t,(t=>(0,qi.A)(e[t])===false));const r=(0,ir.A)(n,(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:cu.MISSING_METHOD,methodName:t})));return hs(r)}class fu{initTreeBuilder(e){this.CST_STACK=[];this.outputCst=e.outputCst;this.nodeLocationTracking=(0,sr.A)(e,"nodeLocationTracking")?e.nodeLocationTracking:bu.nodeLocationTracking;if(!this.outputCst){this.cstInvocationStateUpdate=Ta.A;this.cstFinallyStateUpdate=Ta.A;this.cstPostTerminal=Ta.A;this.cstPostNonTerminal=Ta.A;this.cstPostRule=Ta.A}else{if(/full/i.test(this.nodeLocationTracking)){if(this.recoveryEnabled){this.setNodeLocationFromToken=eu;this.setNodeLocationFromNode=eu;this.cstPostRule=Ta.A;this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery}else{this.setNodeLocationFromToken=Ta.A;this.setNodeLocationFromNode=Ta.A;this.cstPostRule=this.cstPostRuleFull;this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular}}else if(/onlyOffset/i.test(this.nodeLocationTracking)){if(this.recoveryEnabled){this.setNodeLocationFromToken=Zc;this.setNodeLocationFromNode=Zc;this.cstPostRule=Ta.A;this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery}else{this.setNodeLocationFromToken=Ta.A;this.setNodeLocationFromNode=Ta.A;this.cstPostRule=this.cstPostRuleOnlyOffset;this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular}}else if(/none/i.test(this.nodeLocationTracking)){this.setNodeLocationFromToken=Ta.A;this.setNodeLocationFromNode=Ta.A;this.cstPostRule=Ta.A;this.setInitialNodeLocation=Ta.A}else{throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}}}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t);this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0);const n=e.location;if(n.startOffset<=t.startOffset===true){n.endOffset=t.endOffset;n.endLine=t.endLine;n.endColumn=t.endColumn}else{n.startOffset=NaN;n.startLine=NaN;n.startColumn=NaN}}cstPostRuleOnlyOffset(e){const t=this.LA(0);const n=e.location;if(n.startOffset<=t.startOffset===true){n.endOffset=t.endOffset}else{n.startOffset=NaN}}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];tu(n,t,e);this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];nu(n,t,e);this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if((0,Fi.A)(this.baseCstVisitorConstructor)){const e=au(this.className,(0,Tr.A)(this.gastProductionsCache));this.baseCstVisitorConstructor=e;return e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,Fi.A)(this.baseCstVisitorWithDefaultsConstructor)){const e=ou(this.className,(0,Tr.A)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());this.baseCstVisitorWithDefaultsConstructor=e;return e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}class du{initLexerAdapter(){this.tokVector=[];this.tokVectorLength=0;this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==true){throw Error(`Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.`)}this.reset();this.tokVector=e;this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){if(this.currIdx<=this.tokVector.length-2){this.consumeToken();return this.LA(1)}else{return Lu}}LA(e){const t=this.currIdx+e;if(t<0||this.tokVectorLength<=t){return Lu}else{return this.tokVector[t]}}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class hu{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=_u){if(hi(this.definedRulesNames,e)){const t=ao.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className});const n={message:t,type:Ou.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(n)}this.definedRulesNames.push(e);const r=this.defineRule(e,t,n);this[e]=r;return r}OVERRIDE_RULE(e,t,n=_u){const r=ac(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(e,t,n);this[e]=i;return i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{e.apply(this,t);return true}catch(r){if(Ic(r)){return false}else{throw r}}finally{this.reloadRecogState(n);this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Zr((0,nr.A)(this.gastProductionsCache))}}var pu=n(85356);class mu{initRecognizerEngine(e,t){this.className=this.constructor.name;this.shortRuleNameToFull={};this.fullRuleNameToShort={};this.ruleShortNameIdx=256;this.tokenMatcher=ka;this.subruleIdx=0;this.definedRulesNames=[];this.tokensMap={};this.isBackTrackingStack=[];this.RULE_STACK=[];this.RULE_OCCURRENCE_STACK=[];this.gastProductionsCache={};if((0,sr.A)(t,"serializedGrammar")){throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n"+"\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n"+"\tFor Further details.")}if((0,ai.A)(e)){if((0,rr.A)(e)){throw Error("A Token Vocabulary cannot be empty.\n"+"\tNote that the first argument for the parser constructor\n"+"\tis no longer a Token vector (since v4.0).")}if(typeof e[0].startOffset==="number"){throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n"+"\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n"+"\tFor Further details.")}}if((0,ai.A)(e)){this.tokensMap=(0,Ji.A)(e,((e,t)=>{e[t.name]=t;return e}),{})}else if((0,sr.A)(e,"modes")&&Ti((0,Ci.A)((0,nr.A)(e.modes)),Ma)){const t=(0,Ci.A)((0,nr.A)(e.modes));const n=Ni(t);this.tokensMap=(0,Ji.A)(n,((e,t)=>{e[t.name]=t;return e}),{})}else if((0,pu.A)(e)){this.tokensMap=(0,ar.A)(e)}else{throw new Error("<tokensDictionary> argument must be An Array of Token constructors,"+" A dictionary of Token constructors or an IMultiModeLexerDefinition")}this.tokensMap["EOF"]=to;const n=(0,sr.A)(e,"modes")?(0,Ci.A)((0,nr.A)(e.modes)):(0,nr.A)(e);const r=Ti(n,(e=>(0,rr.A)(e.categoryMatches)));this.tokenMatcher=r?ka:Ra;Sa((0,nr.A)(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone){throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\n`+`Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`)}const r=(0,sr.A)(n,"resyncEnabled")?n.resyncEnabled:_u.resyncEnabled;const i=(0,sr.A)(n,"recoveryValueFunc")?n.recoveryValueFunc:_u.recoveryValueFunc;const s=this.ruleShortNameIdx<<Mc+Dc;this.ruleShortNameIdx++;this.shortRuleNameToFull[s]=e;this.fullRuleNameToShort[e]=s;let a;if(this.outputCst===true){a=function n(...a){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx);t.apply(this,a);const n=this.CST_STACK[this.CST_STACK.length-1];this.cstPostRule(n);return n}catch(o){return this.invokeRuleCatch(o,r,i)}finally{this.ruleFinallyStateUpdate()}}}else{a=function n(...a){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx);return t.apply(this,a)}catch(o){return this.invokeRuleCatch(o,r,i)}finally{this.ruleFinallyStateUpdate()}}}const o=Object.assign(a,{ruleName:e,originalGrammarAction:t});return o}invokeRuleCatch(e,t,n){const r=this.RULE_STACK.length===1;const i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Ic(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){t.resyncedTokens=this.reSyncTo(r);if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=true;return e}else{return n(e)}}else{if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=true;t.partialCstResult=e}throw t}}else if(r){this.moveToTerminatedState();return n(e)}else{throw t}}else{throw e}}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(Bc,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n);let i;if(typeof e!=="function"){i=e.DEF;const t=e.GATE;if(t!==undefined){const e=r;r=()=>t.call(this)&&e.call(this)}}else{i=e}if(r.call(this)===true){return i.call(this)}return undefined}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead(jc,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n);let i;if(typeof t!=="function"){i=t.DEF;const e=t.GATE;if(e!==undefined){const t=r;r=()=>e.call(this)&&t.call(this)}}else{i=t}if(r.call(this)===true){let e=this.doSingleRepetition(i);while(r.call(this)===true&&e===true){e=this.doSingleRepetition(i)}}else{throw this.raiseEarlyExitException(e,Po.REPETITION_MANDATORY,t.ERR_MSG)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],r,jc,e,$o)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(Wc,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF;const i=t.SEP;const s=this.getLaFuncFromCache(n);if(s.call(this)===true){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);while(this.tokenMatcher(this.LA(1),i)===true){this.CONSUME(i);r.call(this)}this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Lo],t,Wc,e,Lo)}else{throw this.raiseEarlyExitException(e,Po.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(Kc,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n);let i;if(typeof t!=="function"){i=t.DEF;const e=t.GATE;if(e!==undefined){const t=r;r=()=>e.call(this)&&t.call(this)}}else{i=t}let s=true;while(r.call(this)===true&&s===true){s=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.manyInternal,[e,t],r,Kc,e,No,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(Vc,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF;const i=t.SEP;const s=this.getLaFuncFromCache(n);if(s.call(this)===true){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);while(this.tokenMatcher(this.LA(1),i)===true){this.CONSUME(i);r.call(this)}this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Co],t,Vc,e,Co)}}repetitionSepSecondInternal(e,t,n,r,i){while(n()){this.CONSUME(t);r.call(this)}this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Wc,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();e.call(this);const n=this.getLexerPosition();return n>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(Gc,t);const r=(0,ai.A)(e)?e:e.DEF;const i=this.getLaFuncFromCache(n);const s=i.call(this,r);if(s!==undefined){const e=r[s];return e.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){this.RULE_STACK.pop();this.RULE_OCCURRENCE_STACK.pop();this.cstFinallyStateUpdate();if(this.RULE_STACK.length===0&&this.isAtEndOfInput()===false){const e=this.LA(1);const t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Cc(t,e))}}subruleInternal(e,t,n){let r;try{const i=n!==undefined?n.ARGS:undefined;this.subruleIdx=t;r=e.apply(this,i);this.cstPostNonTerminal(r,n!==undefined&&n.LABEL!==undefined?n.LABEL:e.ruleName);return r}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,t,n){if(Ic(e)&&e.partialCstResult!==undefined){this.cstPostNonTerminal(e.partialCstResult,t!==undefined&&t.LABEL!==undefined?t.LABEL:n);delete e.partialCstResult}throw e}consumeInternal(e,t,n){let r;try{const t=this.LA(1);if(this.tokenMatcher(t,e)===true){this.consumeToken();r=t}else{this.consumeInternalError(e,t,n)}}catch(i){r=this.consumeInternalRecovery(e,t,i)}this.cstPostTerminal(n!==undefined&&n.LABEL!==undefined?n.LABEL:e.name,r);return r}consumeInternalError(e,t,n){let r;const i=this.LA(0);if(n!==undefined&&n.ERR_MSG){r=n.ERR_MSG}else{r=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()})}throw this.SAVE_ERROR(new wc(r,t,i))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(r){if(r.name===bc){throw n}else{throw r}}}else{throw n}}saveRecogState(){const e=this.errors;const t=(0,ar.A)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors;this.importLexerState(e.lexerState);this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n);this.RULE_STACK.push(e);this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),to)}reset(){this.resetLexerState();this.subruleIdx=0;this.isBackTrackingStack=[];this.errors=[];this.RULE_STACK=[];this.CST_STACK=[];this.RULE_OCCURRENCE_STACK=[]}}class gu{initErrorHandler(e){this._errors=[];this.errorMessageProvider=(0,sr.A)(e,"errorMessageProvider")?e.errorMessageProvider:bu.errorMessageProvider}SAVE_ERROR(e){if(Ic(e)){e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,ar.A)(this.RULE_OCCURRENCE_STACK)};this._errors.push(e);return e}else{throw Error("Trying to save an Error which is not a RecognitionException")}}get errors(){return(0,ar.A)(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName();const i=this.getGAstProductions()[r];const s=Yo(e,i,t,this.maxLookahead);const a=s[0];const o=[];for(let u=1;u<=this.maxLookahead;u++){o.push(this.LA(u))}const c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new $c(c,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName();const r=this.getGAstProductions()[n];const i=qo(e,r,this.maxLookahead);const s=[];for(let c=1;c<=this.maxLookahead;c++){s.push(this.LA(c))}const a=this.LA(0);const o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:s,previous:a,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Nc(o,this.LA(1),a))}}class yu{initContentAssist(){}computeContentAssist(e,t){const n=this.gastProductionsCache[e];if((0,Fi.A)(n)){throw Error(`Rule ->${e}<- does not exist in this grammar.`)}return _o([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=ms(e.ruleStack);const n=this.getGAstProductions();const r=n[t];const i=new So(r,e).startWalking();return i}}const Au={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Au);const Tu=true;const vu=Math.pow(2,Dc)-1;const Eu=Za({name:"RECORDING_PHASE_TOKEN",pattern:Ga.NA});Sa([Eu]);const Ru=no(Eu,"This IToken indicates the Parser is in Recording Phase\n\t"+""+"See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Ru);const ku={name:"This CSTNode indicates the Parser is in Recording Phase\n\t"+"See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};class xu{initGastRecorder(e){this.recordingProdStack=[];this.RECORDING_PHASE=false}enableRecording(){this.RECORDING_PHASE=true;this.TRACE_INIT("Enable Recording",(()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)};this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)};this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)};this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)};this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)};this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)};this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)};this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this[`consume`]=function(e,t,n){return this.consumeInternalRecord(t,e,n)};this[`subrule`]=function(e,t,n){return this.subruleInternalRecord(t,e,n)};this[`option`]=function(e,t){return this.optionInternalRecord(t,e)};this[`or`]=function(e,t){return this.orInternalRecord(t,e)};this[`many`]=function(e,t){this.manyInternalRecord(e,t)};this[`atLeastOne`]=function(e,t){this.atLeastOneInternalRecord(e,t)};this.ACTION=this.ACTION_RECORD;this.BACKTRACK=this.BACKTRACK_RECORD;this.LA=this.LA_RECORD}))}disableRecording(){this.RECORDING_PHASE=false;this.TRACE_INIT("Deleting Recording methods",(()=>{const e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`];delete e[`SUBRULE${n}`];delete e[`OPTION${n}`];delete e[`OR${n}`];delete e[`MANY${n}`];delete e[`MANY_SEP${n}`];delete e[`AT_LEAST_ONE${n}`];delete e[`AT_LEAST_ONE_SEP${n}`]}delete e[`consume`];delete e[`subrule`];delete e[`option`];delete e[`or`];delete e[`many`];delete e[`atLeastOne`];delete e.ACTION;delete e.BACKTRACK;delete e.LA}))}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>true}LA_RECORD(e){return Lu}topLevelRuleRecord(e,t){try{const n=new Vr({definition:[],name:e});n.name=e;this.recordingProdStack.push(n);t.call(this);this.recordingProdStack.pop();return n}catch(n){if(n.KNOWN_RECORDER_ERROR!==true){try{n.message=n.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\t'+"https://chevrotain.io/docs/guide/internals.html#grammar-recording"}catch(r){throw n}}throw n}}optionInternalRecord(e,t){return Iu.call(this,Hr,e,t)}atLeastOneInternalRecord(e,t){Iu.call(this,zr,t,e)}atLeastOneSepFirstInternalRecord(e,t){Iu.call(this,qr,t,e,Tu)}manyInternalRecord(e,t){Iu.call(this,Yr,t,e)}manySepFirstInternalRecord(e,t){Iu.call(this,Xr,t,e,Tu)}orInternalRecord(e,t){return Su.call(this,e,t)}subruleInternalRecord(e,t,n){Nu(t);if(!e||(0,sr.A)(e,"ruleName")===false){const n=new Error(`<SUBRULE${wu(t)}> argument is invalid`+` expecting a Parser method reference but got: <${JSON.stringify(e)}>`+`\n inside top level rule: <${this.recordingProdStack[0].name}>`);n.KNOWN_RECORDER_ERROR=true;throw n}const r=(0,va.A)(this.recordingProdStack);const i=e.ruleName;const s=new jr({idx:t,nonTerminalName:i,label:n===null||n===void 0?void 0:n.LABEL,referencedRule:undefined});r.definition.push(s);return this.outputCst?ku:Au}consumeInternalRecord(e,t,n){Nu(t);if(!ba(e)){const n=new Error(`<CONSUME${wu(t)}> argument is invalid`+` expecting a TokenType reference but got: <${JSON.stringify(e)}>`+`\n inside top level rule: <${this.recordingProdStack[0].name}>`);n.KNOWN_RECORDER_ERROR=true;throw n}const r=(0,va.A)(this.recordingProdStack);const i=new Jr({idx:t,terminalType:e,label:n===null||n===void 0?void 0:n.LABEL});r.definition.push(i);return Ru}}function Iu(e,t,n,r=false){Nu(n);const i=(0,va.A)(this.recordingProdStack);const s=(0,qi.A)(t)?t:t.DEF;const a=new e({definition:[],idx:n});if(r){a.separator=t.SEP}if((0,sr.A)(t,"MAX_LOOKAHEAD")){a.maxLookahead=t.MAX_LOOKAHEAD}this.recordingProdStack.push(a);s.call(this);i.definition.push(a);this.recordingProdStack.pop();return Au}function Su(e,t){Nu(t);const n=(0,va.A)(this.recordingProdStack);const r=(0,ai.A)(e)===false;const i=r===false?e:e.DEF;const s=new Qr({definition:[],idx:t,ignoreAmbiguities:r&&e.IGNORE_AMBIGUITIES===true});if((0,sr.A)(e,"MAX_LOOKAHEAD")){s.maxLookahead=e.MAX_LOOKAHEAD}const a=ui(i,(e=>(0,qi.A)(e.GATE)));s.hasPredicates=a;n.definition.push(s);(0,tr.A)(i,(e=>{const t=new Wr({definition:[]});s.definition.push(t);if((0,sr.A)(e,"IGNORE_AMBIGUITIES")){t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES}else if((0,sr.A)(e,"GATE")){t.ignoreAmbiguities=true}this.recordingProdStack.push(t);e.ALT.call(this);this.recordingProdStack.pop()}));return Au}function wu(e){return e===0?"":`${e}`}function Nu(e){if(e<0||e>vu){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\t`+`Idx value must be a none negative value smaller than ${vu+1}`);t.KNOWN_RECORDER_ERROR=true;throw t}}class Cu{initPerformanceTracer(e){if((0,sr.A)(e,"traceInitPerf")){const t=e.traceInitPerf;const n=typeof t==="number";this.traceInitMaxIdent=n?t:Infinity;this.traceInitPerf=n?t>0:t}else{this.traceInitMaxIdent=0;this.traceInitPerf=bu.traceInitPerf}this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===true){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");if(this.traceInitIndent<this.traceInitMaxIdent){console.log(`${n}--\x3e <${e}>`)}const{time:r,value:i}=Ea(t);const s=r>10?console.warn:console.log;if(this.traceInitIndent<this.traceInitMaxIdent){s(`${n}<-- <${e}> time: ${r}ms`)}this.traceInitIndent--;return i}else{return t()}}}function $u(e,t){t.forEach((t=>{const n=t.prototype;Object.getOwnPropertyNames(n).forEach((r=>{if(r==="constructor"){return}const i=Object.getOwnPropertyDescriptor(n,r);if(i&&(i.get||i.set)){Object.defineProperty(e.prototype,r,i)}else{e.prototype[r]=t.prototype[r]}}))}))}const Lu=no(to,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Lu);const bu=Object.freeze({recoveryEnabled:false,maxLookahead:3,dynamicTokensEnabled:false,outputCst:true,errorMessageProvider:io,nodeLocationTracking:"none",traceInitPerf:false,skipValidations:false});const _u=Object.freeze({recoveryValueFunc:()=>undefined,resyncEnabled:true});var Ou;(function(e){e[e["INVALID_RULE_NAME"]=0]="INVALID_RULE_NAME";e[e["DUPLICATE_RULE_NAME"]=1]="DUPLICATE_RULE_NAME";e[e["INVALID_RULE_OVERRIDE"]=2]="INVALID_RULE_OVERRIDE";e[e["DUPLICATE_PRODUCTIONS"]=3]="DUPLICATE_PRODUCTIONS";e[e["UNRESOLVED_SUBRULE_REF"]=4]="UNRESOLVED_SUBRULE_REF";e[e["LEFT_RECURSION"]=5]="LEFT_RECURSION";e[e["NONE_LAST_EMPTY_ALT"]=6]="NONE_LAST_EMPTY_ALT";e[e["AMBIGUOUS_ALTS"]=7]="AMBIGUOUS_ALTS";e[e["CONFLICT_TOKENS_RULES_NAMESPACE"]=8]="CONFLICT_TOKENS_RULES_NAMESPACE";e[e["INVALID_TOKEN_NAME"]=9]="INVALID_TOKEN_NAME";e[e["NO_NON_EMPTY_LOOKAHEAD"]=10]="NO_NON_EMPTY_LOOKAHEAD";e[e["AMBIGUOUS_PREFIX_ALTS"]=11]="AMBIGUOUS_PREFIX_ALTS";e[e["TOO_MANY_ALTS"]=12]="TOO_MANY_ALTS";e[e["CUSTOM_LOOKAHEAD_VALIDATION"]=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Ou||(Ou={}));function Pu(e=undefined){return function(){return e}}class Mu{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated."+"\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",(()=>{let e;this.selfAnalysisDone=true;const t=this.className;this.TRACE_INIT("toFastProps",(()=>{or(this)}));this.TRACE_INIT("Grammar Recording",(()=>{try{this.enableRecording();(0,tr.A)(this.definedRulesNames,(e=>{const t=this[e];const n=t["originalGrammarAction"];let r;this.TRACE_INIT(`${e} Rule`,(()=>{r=this.topLevelRuleRecord(e,n)}));this.gastProductionsCache[e]=r}))}finally{this.disableRecording()}}));let n=[];this.TRACE_INIT("Grammar Resolving",(()=>{n=Ac({rules:(0,nr.A)(this.gastProductionsCache)});this.definitionErrors=this.definitionErrors.concat(n)}));this.TRACE_INIT("Grammar Validations",(()=>{if((0,rr.A)(n)&&this.skipValidations===false){const e=Tc({rules:(0,nr.A)(this.gastProductionsCache),tokenTypes:(0,nr.A)(this.tokensMap),errMsgProvider:ao,grammarName:t});const n=Zo({lookaheadStrategy:this.lookaheadStrategy,rules:(0,nr.A)(this.gastProductionsCache),tokenTypes:(0,nr.A)(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(e,n)}}));if((0,rr.A)(this.definitionErrors)){if(this.recoveryEnabled){this.TRACE_INIT("computeAllProdsFollows",(()=>{const e=Mi((0,nr.A)(this.gastProductionsCache));this.resyncFollows=e}))}this.TRACE_INIT("ComputeLookaheadFunctions",(()=>{var e,t;(t=(e=this.lookaheadStrategy).initialize)===null||t===void 0?void 0:t.call(e,{rules:(0,nr.A)(this.gastProductionsCache)});this.preComputeLookaheadFunctions((0,nr.A)(this.gastProductionsCache))}))}if(!Mu.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,rr.A)(this.definitionErrors)){e=(0,ir.A)(this.definitionErrors,(e=>e.message));throw new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)}}))}constructor(e,t){this.definitionErrors=[];this.selfAnalysisDone=false;const n=this;n.initErrorHandler(t);n.initLexerAdapter();n.initLooksAhead(t);n.initRecognizerEngine(e,t);n.initRecoverable(t);n.initTreeBuilder(t);n.initContentAssist();n.initGastRecorder(t);n.initPerformanceTracer(t);if((0,sr.A)(t,"ignoredIssues")){throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\t"+"Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\t"+"See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\t"+"For further details.")}this.skipValidations=(0,sr.A)(t,"skipValidations")?t.skipValidations:bu.skipValidations}}Mu.DEFER_DEFINITION_ERRORS_HANDLING=false;$u(Mu,[Oc,Yc,fu,du,mu,hu,gu,yu,xu,Cu]);class Du extends Mu{constructor(e,t=bu){const n=(0,ar.A)(t);n.outputCst=true;super(e,n)}}class Uu extends Mu{constructor(e,t=bu){const n=(0,ar.A)(t);n.outputCst=false;super(e,n)}}function Fu(e){const t=new Gu;const n=values(e);return map(n,(e=>t.visitRule(e)))}class Gu extends(null&&GAstVisitor){visitRule(e){const t=this.visitEach(e.definition);const n=groupBy(t,(e=>e.propertyName));const r=map(n,((e,t)=>{const n=!some(e,(e=>!e.canBeNull));let r=e[0].type;if(e.length>1){r=map(e,(e=>e.type))}return{name:t,type:r,optional:n}}));return{name:e.name,properties:r}}visitAlternative(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitOption(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitRepetition(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitRepetitionMandatory(e){return this.visitEach(e.definition)}visitRepetitionMandatoryWithSeparator(e){return this.visitEach(e.definition).concat({propertyName:e.separator.name,canBeNull:true,type:Bu(e.separator)})}visitRepetitionWithSeparator(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true}).concat({propertyName:e.separator.name,canBeNull:true,type:Bu(e.separator)})}visitAlternation(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitTerminal(e){return[{propertyName:e.label||e.terminalType.name,canBeNull:false,type:Bu(e)}]}visitNonTerminal(e){return[{propertyName:e.label||e.nonTerminalName,canBeNull:false,type:Bu(e)}]}visitEachAndOverrideWith(e,t){return map(this.visitEach(e),(e=>assign({},e,t)))}visitEach(e){return flatten(map(e,(e=>this.visit(e))))}}function Bu(e){if(e instanceof NonTerminal){return{kind:"rule",name:e.referencedRule.name}}return{kind:"token"}}const Ku={includeVisitorInterface:true,visitorInterfaceName:"ICstNodeVisitor"};function ju(e,t){const n=Object.assign(Object.assign({},Ku),t);const r=buildModel(e);return genDts(r,n)}function Vu(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API."+"\n\t It performs no action other than printing this message."+"\n\t Please avoid using it as it will be completely removed in the future")}class Wu{constructor(){throw new Error("The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.\t\n"+"See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0")}}function Hu(e,t,n){return`${e.name}_${t}_${n}`}const zu=0;const qu=1;const Yu=2;const Xu=4;const Qu=5;const Ju=6;const Zu=7;const el=8;const tl=9;const nl=10;const rl=11;const il=12;class sl{constructor(e){this.target=e}isEpsilon(){return false}}class al extends sl{constructor(e,t){super(e);this.tokenType=t}}class ol extends sl{constructor(e){super(e)}isEpsilon(){return true}}class cl extends sl{constructor(e,t,n){super(e);this.rule=t;this.followState=n}isEpsilon(){return true}}function ul(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};ll(t,e);const n=e.length;for(let r=0;r<n;r++){const n=e[r];const i=Al(t,n,n);if(i===undefined){continue}Nl(t,n,i)}return t}function ll(e,t){const n=t.length;for(let r=0;r<n;r++){const n=t[r];const i=$l(e,n,undefined,{type:Yu});const s=$l(e,n,undefined,{type:Zu});i.stop=s;e.ruleToStartState.set(n,i);e.ruleToStopState.set(n,s)}}function fl(e,t,n){if(n instanceof Jr){return Sl(e,t,n.terminalType,n)}else if(n instanceof jr){return wl(e,t,n)}else if(n instanceof Qr){return gl(e,t,n)}else if(n instanceof Hr){return yl(e,t,n)}else if(n instanceof Yr){return dl(e,t,n)}else if(n instanceof Xr){return hl(e,t,n)}else if(n instanceof zr){return pl(e,t,n)}else if(n instanceof qr){return ml(e,t,n)}else{return Al(e,t,n)}}function dl(e,t,n){const r=$l(e,t,n,{type:Qu});Rl(e,r);const i=kl(e,t,r,n,Al(e,t,n));return vl(e,t,n,i)}function hl(e,t,n){const r=$l(e,t,n,{type:Qu});Rl(e,r);const i=kl(e,t,r,n,Al(e,t,n));const s=Sl(e,t,n.separator,n);return vl(e,t,n,i,s)}function pl(e,t,n){const r=$l(e,t,n,{type:Xu});Rl(e,r);const i=kl(e,t,r,n,Al(e,t,n));return Tl(e,t,n,i)}function ml(e,t,n){const r=$l(e,t,n,{type:Xu});Rl(e,r);const i=kl(e,t,r,n,Al(e,t,n));const s=Sl(e,t,n.separator,n);return Tl(e,t,n,i,s)}function gl(e,t,n){const r=$l(e,t,n,{type:qu});Rl(e,r);const i=(0,ir.A)(n.definition,(n=>fl(e,t,n)));const s=kl(e,t,r,n,...i);return s}function yl(e,t,n){const r=$l(e,t,n,{type:qu});Rl(e,r);const i=kl(e,t,r,n,Al(e,t,n));return El(e,t,n,i)}function Al(e,t,n){const r=(0,Zi.A)((0,ir.A)(n.definition,(n=>fl(e,t,n))),(e=>e!==undefined));if(r.length===1){return r[0]}else if(r.length===0){return undefined}else{return Il(e,r)}}function Tl(e,t,n,r,i){const s=r.left;const a=r.right;const o=$l(e,t,n,{type:rl});Rl(e,o);const c=$l(e,t,n,{type:il});s.loopback=o;c.loopback=o;e.decisionMap[Hu(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=o;Cl(a,o);if(i===undefined){Cl(o,s);Cl(o,c)}else{Cl(o,c);Cl(o,i.left);Cl(i.right,s)}return{left:s,right:c}}function vl(e,t,n,r,i){const s=r.left;const a=r.right;const o=$l(e,t,n,{type:nl});Rl(e,o);const c=$l(e,t,n,{type:il});const u=$l(e,t,n,{type:tl});o.loopback=u;c.loopback=u;Cl(o,s);Cl(o,c);Cl(a,u);if(i!==undefined){Cl(u,c);Cl(u,i.left);Cl(i.right,s)}else{Cl(u,o)}e.decisionMap[Hu(t,i?"RepetitionWithSeparator":"Repetition",n.idx)]=o;return{left:o,right:c}}function El(e,t,n,r){const i=r.left;const s=r.right;Cl(i,s);e.decisionMap[Hu(t,"Option",n.idx)]=i;return r}function Rl(e,t){e.decisionStates.push(t);t.decision=e.decisionStates.length-1;return t.decision}function kl(e,t,n,r,...i){const s=$l(e,t,r,{type:el,start:n});n.end=s;for(const o of i){if(o!==undefined){Cl(n,o.left);Cl(o.right,s)}else{Cl(n,s)}}const a={left:n,right:s};e.decisionMap[Hu(t,xl(r),r.idx)]=n;return a}function xl(e){if(e instanceof Qr){return"Alternation"}else if(e instanceof Hr){return"Option"}else if(e instanceof Yr){return"Repetition"}else if(e instanceof Xr){return"RepetitionWithSeparator"}else if(e instanceof zr){return"RepetitionMandatory"}else if(e instanceof qr){return"RepetitionMandatoryWithSeparator"}else{throw new Error("Invalid production type encountered")}}function Il(e,t){const n=t.length;for(let s=0;s<n-1;s++){const n=t[s];let r;if(n.left.transitions.length===1){r=n.left.transitions[0]}const i=r instanceof cl;const a=r;const o=t[s+1].left;if(n.left.type===qu&&n.right.type===qu&&r!==undefined&&(i&&a.followState===n.right||r.target===n.right)){if(i){a.followState=o}else{r.target=o}bl(e,n.right)}else{Cl(n.right,o)}}const r=t[0];const i=t[n-1];return{left:r.left,right:i.right}}function Sl(e,t,n,r){const i=$l(e,t,r,{type:qu});const s=$l(e,t,r,{type:qu});Ll(i,new al(s,n));return{left:i,right:s}}function wl(e,t,n){const r=n.referencedRule;const i=e.ruleToStartState.get(r);const s=$l(e,t,n,{type:qu});const a=$l(e,t,n,{type:qu});const o=new cl(i,r,a);Ll(s,o);return{left:s,right:a}}function Nl(e,t,n){const r=e.ruleToStartState.get(t);Cl(r,n.left);const i=e.ruleToStopState.get(t);Cl(n.right,i);const s={left:r,right:i};return s}function Cl(e,t){const n=new ol(t);Ll(e,n)}function $l(e,t,n,r){const i=Object.assign({atn:e,production:n,epsilonOnlyTransitions:false,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},r);e.states.push(i);return i}function Ll(e,t){if(e.transitions.length===0){e.epsilonOnlyTransitions=t.isEpsilon()}e.transitions.push(t)}function bl(e,t){e.states.splice(e.states.indexOf(t),1)}const _l={};class Ol{constructor(){this.map={};this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const t=Pl(e);if(!(t in this.map)){this.map[t]=this.configs.length;this.configs.push(e)}}get elements(){return this.configs}get alts(){return(0,ir.A)(this.configs,(e=>e.alt))}get key(){let e="";for(const t in this.map){e+=t+":"}return e}}function Pl(e,t=true){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map((e=>e.stateNumber.toString())).join("_")}`}var Ml=n(963);function Dl(e,t){return e&&e.length?(0,Si.A)(e,(0,Ir.A)(t,2)):[]}const Ul=Dl;function Fl(e,t){const n={};return r=>{const i=r.toString();let s=n[i];if(s!==undefined){return s}else{s={atnStartState:e,decision:t,states:{}};n[i]=s;return s}}}class Gl{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let n=0;n<t;n++){e+=this.predicates[n]===true?"1":"0"}return e}}const Bl=new Gl;class Kl extends qc{constructor(e){var t;super();this.logging=(t=e===null||e===void 0?void 0:e.logging)!==null&&t!==void 0?t:e=>console.log(e)}initialize(e){this.atn=ul(e.rules);this.dfas=Vl(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=e;const s=this.dfas;const a=this.logging;const o=Hu(n,"Alternation",t);const c=this.atn.decisionMap[o];const u=c.decision;const l=(0,ir.A)(Do({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:n}),(e=>(0,ir.A)(e,(e=>e[0]))));if(jl(l,false)&&!i){const e=(0,Ji.A)(l,((e,t,n)=>{(0,tr.A)(t,(t=>{if(t){e[t.tokenTypeIdx]=n;(0,tr.A)(t.categoryMatches,(t=>{e[t]=n}))}}));return e}),{});if(r){return function(t){var n;const r=this.LA(1);const i=e[r.tokenTypeIdx];if(t!==undefined&&i!==undefined){const e=(n=t[i])===null||n===void 0?void 0:n.GATE;if(e!==undefined&&e.call(this)===false){return undefined}}return i}}else{return function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}}else if(r){return function(e){const t=new Gl;const n=e===undefined?0:e.length;for(let i=0;i<n;i++){const n=e===null||e===void 0?void 0:e[i].GATE;t.set(i,n===undefined||n.call(this))}const r=Wl.call(this,s,u,t,a);return typeof r==="number"?r:undefined}}else{return function(){const e=Wl.call(this,s,u,Bl,a);return typeof e==="number"?e:undefined}}}buildLookaheadForOptional(e){const{prodOccurrence:t,rule:n,prodType:r,dynamicTokensEnabled:i}=e;const s=this.dfas;const a=this.logging;const o=Hu(n,r,t);const c=this.atn.decisionMap[o];const u=c.decision;const l=(0,ir.A)(Do({maxLookahead:1,occurrence:t,prodType:r,rule:n}),(e=>(0,ir.A)(e,(e=>e[0]))));if(jl(l)&&l[0][0]&&!i){const e=l[0];const t=(0,Ci.A)(e);if(t.length===1&&(0,rr.A)(t[0].categoryMatches)){const e=t[0];const n=e.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===n}}else{const e=(0,Ji.A)(t,((e,t)=>{if(t!==undefined){e[t.tokenTypeIdx]=true;(0,tr.A)(t.categoryMatches,(t=>{e[t]=true}))}return e}),{});return function(){const t=this.LA(1);return e[t.tokenTypeIdx]===true}}}return function(){const e=Wl.call(this,s,u,Bl,a);return typeof e==="object"?false:e===0}}}function jl(e,t=true){const n=new Set;for(const r of e){const e=new Set;for(const i of r){if(i===undefined){if(t){break}else{return false}}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of r){if(n.has(t)){if(!e.has(t)){return false}}else{n.add(t);e.add(t)}}}}return true}function Vl(e){const t=e.decisionStates.length;const n=Array(t);for(let r=0;r<t;r++){n[r]=Fl(e.decisionStates[r],r)}return n}function Wl(e,t,n,r){const i=e[t](n);let s=i.start;if(s===undefined){const e=af(i.atnStartState);s=sf(i,nf(e));i.start=s}const a=Hl.apply(this,[i,s,n,r]);return a}function Hl(e,t,n,r){let i=t;let s=1;const a=[];let o=this.LA(s++);while(true){let t=Jl(i,o);if(t===undefined){t=zl.apply(this,[e,i,o,s,n,r])}if(t===_l){return Ql(a,i,o)}if(t.isAcceptState===true){return t.prediction}i=t;a.push(o);o=this.LA(s++)}}function zl(e,t,n,r,i,s){const a=Zl(t.configs,n,i);if(a.size===0){rf(e,t,n,_l);return _l}let o=nf(a);const c=tf(a,i);if(c!==undefined){o.isAcceptState=true;o.prediction=c;o.configs.uniqueAlt=c}else if(ff(a)){const t=(0,Ml.A)(a.alts);o.isAcceptState=true;o.prediction=t;o.configs.uniqueAlt=t;ql.apply(this,[e,r,a.alts,s])}o=rf(e,t,n,o);return o}function ql(e,t,n,r){const i=[];for(let u=1;u<=t;u++){i.push(this.LA(u).tokenType)}const s=e.atnStartState;const a=s.rule;const o=s.production;const c=Yl({topLevelRule:a,ambiguityIndices:n,production:o,prefixPath:i});r(c)}function Yl(e){const t=(0,ir.A)(e.prefixPath,(e=>Ba(e))).join(", ");const n=e.production.idx===0?"":e.production.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${Xl(e.production)}${n}>`+` inside <${e.topLevelRule.name}> Rule,\n`+`<${t}> may appears as a prefix path in all these alternatives.\n`;r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\n`+`For Further details.`;return r}function Xl(e){if(e instanceof jr){return"SUBRULE"}else if(e instanceof Hr){return"OPTION"}else if(e instanceof Qr){return"OR"}else if(e instanceof zr){return"AT_LEAST_ONE"}else if(e instanceof qr){return"AT_LEAST_ONE_SEP"}else if(e instanceof Xr){return"MANY_SEP"}else if(e instanceof Yr){return"MANY"}else if(e instanceof Jr){return"CONSUME"}else{throw Error("non exhaustive match")}}function Ql(e,t,n){const r=lo(t.configs.elements,(e=>e.state.transitions));const i=Ul(r.filter((e=>e instanceof al)).map((e=>e.tokenType)),(e=>e.tokenTypeIdx));return{actualToken:n,possibleTokenTypes:i,tokenPath:e}}function Jl(e,t){return e.edges[t.tokenTypeIdx]}function Zl(e,t,n){const r=new Ol;const i=[];for(const a of e.elements){if(n.is(a.alt)===false){continue}if(a.state.type===Zu){i.push(a);continue}const e=a.state.transitions.length;for(let n=0;n<e;n++){const e=a.state.transitions[n];const i=ef(e,t);if(i!==undefined){r.add({state:i,alt:a.alt,stack:a.stack})}}}let s;if(i.length===0&&r.size===1){s=r}if(s===undefined){s=new Ol;for(const e of r.elements){of(e,s)}}if(i.length>0&&!uf(s)){for(const e of i){s.add(e)}}return s}function ef(e,t){if(e instanceof al&&ro(t,e.tokenType)){return e.target}return undefined}function tf(e,t){let n;for(const r of e.elements){if(t.is(r.alt)===true){if(n===undefined){n=r.alt}else if(n!==r.alt){return undefined}}}return n}function nf(e){return{configs:e,edges:{},isAcceptState:false,prediction:-1}}function rf(e,t,n,r){r=sf(e,r);t.edges[n.tokenTypeIdx]=r;return r}function sf(e,t){if(t===_l){return t}const n=t.configs.key;const r=e.states[n];if(r!==undefined){return r}t.configs.finalize();e.states[n]=t;return t}function af(e){const t=new Ol;const n=e.transitions.length;for(let r=0;r<n;r++){const n=e.transitions[r].target;const i={state:n,alt:r,stack:[]};of(i,t)}return t}function of(e,t){const n=e.state;if(n.type===Zu){if(e.stack.length>0){const n=[...e.stack];const r=n.pop();const i={state:r,alt:e.alt,stack:n};of(i,t)}else{t.add(e)}return}if(!n.epsilonOnlyTransitions){t.add(e)}const r=n.transitions.length;for(let i=0;i<r;i++){const r=n.transitions[i];const s=cf(e,r);if(s!==undefined){of(s,t)}}}function cf(e,t){if(t instanceof ol){return{state:t.target,alt:e.alt,stack:e.stack}}else if(t instanceof cl){const n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}return undefined}function uf(e){for(const t of e.elements){if(t.state.type===Zu){return true}}return false}function lf(e){for(const t of e.elements){if(t.state.type!==Zu){return false}}return true}function ff(e){if(lf(e)){return true}const t=df(e.elements);const n=hf(t)&&!pf(t);return n}function df(e){const t=new Map;for(const n of e){const e=Pl(n,false);let r=t.get(e);if(r===undefined){r={};t.set(e,r)}r[n.alt]=true}return t}function hf(e){for(const t of Array.from(e.values())){if(Object.keys(t).length>1){return true}}return false}function pf(e){for(const t of Array.from(e.values())){if(Object.keys(t).length===1){return true}}return false}var mf;(function(e){function t(e){return typeof e==="string"}e.is=t})(mf||(mf={}));var gf;(function(e){function t(e){return typeof e==="string"}e.is=t})(gf||(gf={}));var yf;(function(e){e.MIN_VALUE=-2147483648;e.MAX_VALUE=2147483647;function t(t){return typeof t==="number"&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(yf||(yf={}));var Af;(function(e){e.MIN_VALUE=0;e.MAX_VALUE=2147483647;function t(t){return typeof t==="number"&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(Af||(Af={}));var Tf;(function(e){function t(e,t){if(e===Number.MAX_VALUE){e=Af.MAX_VALUE}if(t===Number.MAX_VALUE){t=Af.MAX_VALUE}return{line:e,character:t}}e.create=t;function n(e){let t=e;return Wd.objectLiteral(t)&&Wd.uinteger(t.line)&&Wd.uinteger(t.character)}e.is=n})(Tf||(Tf={}));var vf;(function(e){function t(e,t,n,r){if(Wd.uinteger(e)&&Wd.uinteger(t)&&Wd.uinteger(n)&&Wd.uinteger(r)){return{start:Tf.create(e,t),end:Tf.create(n,r)}}else if(Tf.is(e)&&Tf.is(t)){return{start:e,end:t}}else{throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}}e.create=t;function n(e){let t=e;return Wd.objectLiteral(t)&&Tf.is(t.start)&&Tf.is(t.end)}e.is=n})(vf||(vf={}));var Ef;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return Wd.objectLiteral(t)&&vf.is(t.range)&&(Wd.string(t.uri)||Wd.undefined(t.uri))}e.is=n})(Ef||(Ef={}));var Rf;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return Wd.objectLiteral(t)&&vf.is(t.targetRange)&&Wd.string(t.targetUri)&&vf.is(t.targetSelectionRange)&&(vf.is(t.originSelectionRange)||Wd.undefined(t.originSelectionRange))}e.is=n})(Rf||(Rf={}));var kf;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&Wd.numberRange(t.red,0,1)&&Wd.numberRange(t.green,0,1)&&Wd.numberRange(t.blue,0,1)&&Wd.numberRange(t.alpha,0,1)}e.is=n})(kf||(kf={}));var xf;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&vf.is(t.range)&&kf.is(t.color)}e.is=n})(xf||(xf={}));var If;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&Wd.string(t.label)&&(Wd.undefined(t.textEdit)||Of.is(t))&&(Wd.undefined(t.additionalTextEdits)||Wd.typedArray(t.additionalTextEdits,Of.is))}e.is=n})(If||(If={}));var Sf;(function(e){e.Comment="comment";e.Imports="imports";e.Region="region"})(Sf||(Sf={}));var wf;(function(e){function t(e,t,n,r,i,s){const a={startLine:e,endLine:t};if(Wd.defined(n)){a.startCharacter=n}if(Wd.defined(r)){a.endCharacter=r}if(Wd.defined(i)){a.kind=i}if(Wd.defined(s)){a.collapsedText=s}return a}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&Wd.uinteger(t.startLine)&&Wd.uinteger(t.startLine)&&(Wd.undefined(t.startCharacter)||Wd.uinteger(t.startCharacter))&&(Wd.undefined(t.endCharacter)||Wd.uinteger(t.endCharacter))&&(Wd.undefined(t.kind)||Wd.string(t.kind))}e.is=n})(wf||(wf={}));var Nf;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Ef.is(t.location)&&Wd.string(t.message)}e.is=n})(Nf||(Nf={}));var Cf;(function(e){e.Error=1;e.Warning=2;e.Information=3;e.Hint=4})(Cf||(Cf={}));var $f;(function(e){e.Unnecessary=1;e.Deprecated=2})($f||($f={}));var Lf;(function(e){function t(e){const t=e;return Wd.objectLiteral(t)&&Wd.string(t.href)}e.is=t})(Lf||(Lf={}));var bf;(function(e){function t(e,t,n,r,i,s){let a={range:e,message:t};if(Wd.defined(n)){a.severity=n}if(Wd.defined(r)){a.code=r}if(Wd.defined(i)){a.source=i}if(Wd.defined(s)){a.relatedInformation=s}return a}e.create=t;function n(e){var t;let n=e;return Wd.defined(n)&&vf.is(n.range)&&Wd.string(n.message)&&(Wd.number(n.severity)||Wd.undefined(n.severity))&&(Wd.integer(n.code)||Wd.string(n.code)||Wd.undefined(n.code))&&(Wd.undefined(n.codeDescription)||Wd.string((t=n.codeDescription)===null||t===void 0?void 0:t.href))&&(Wd.string(n.source)||Wd.undefined(n.source))&&(Wd.undefined(n.relatedInformation)||Wd.typedArray(n.relatedInformation,Nf.is))}e.is=n})(bf||(bf={}));var _f;(function(e){function t(e,t,...n){let r={title:e,command:t};if(Wd.defined(n)&&n.length>0){r.arguments=n}return r}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.title)&&Wd.string(t.command)}e.is=n})(_f||(_f={}));var Of;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:""}}e.del=r;function i(e){const t=e;return Wd.objectLiteral(t)&&Wd.string(t.newText)&&vf.is(t.range)}e.is=i})(Of||(Of={}));var Pf;(function(e){function t(e,t,n){const r={label:e};if(t!==undefined){r.needsConfirmation=t}if(n!==undefined){r.description=n}return r}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&Wd.string(t.label)&&(Wd.boolean(t.needsConfirmation)||t.needsConfirmation===undefined)&&(Wd.string(t.description)||t.description===undefined)}e.is=n})(Pf||(Pf={}));var Mf;(function(e){function t(e){const t=e;return Wd.string(t)}e.is=t})(Mf||(Mf={}));var Df;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:"",annotationId:t}}e.del=r;function i(e){const t=e;return Of.is(t)&&(Pf.is(t.annotationId)||Mf.is(t.annotationId))}e.is=i})(Df||(Df={}));var Uf;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&qf.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(Uf||(Uf={}));var Ff;(function(e){function t(e,t,n){let r={kind:"create",uri:e};if(t!==undefined&&(t.overwrite!==undefined||t.ignoreIfExists!==undefined)){r.options=t}if(n!==undefined){r.annotationId=n}return r}e.create=t;function n(e){let t=e;return t&&t.kind==="create"&&Wd.string(t.uri)&&(t.options===undefined||(t.options.overwrite===undefined||Wd.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===undefined||Wd.boolean(t.options.ignoreIfExists)))&&(t.annotationId===undefined||Mf.is(t.annotationId))}e.is=n})(Ff||(Ff={}));var Gf;(function(e){function t(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};if(n!==undefined&&(n.overwrite!==undefined||n.ignoreIfExists!==undefined)){i.options=n}if(r!==undefined){i.annotationId=r}return i}e.create=t;function n(e){let t=e;return t&&t.kind==="rename"&&Wd.string(t.oldUri)&&Wd.string(t.newUri)&&(t.options===undefined||(t.options.overwrite===undefined||Wd.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===undefined||Wd.boolean(t.options.ignoreIfExists)))&&(t.annotationId===undefined||Mf.is(t.annotationId))}e.is=n})(Gf||(Gf={}));var Bf;(function(e){function t(e,t,n){let r={kind:"delete",uri:e};if(t!==undefined&&(t.recursive!==undefined||t.ignoreIfNotExists!==undefined)){r.options=t}if(n!==undefined){r.annotationId=n}return r}e.create=t;function n(e){let t=e;return t&&t.kind==="delete"&&Wd.string(t.uri)&&(t.options===undefined||(t.options.recursive===undefined||Wd.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===undefined||Wd.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===undefined||Mf.is(t.annotationId))}e.is=n})(Bf||(Bf={}));var Kf;(function(e){function t(e){let t=e;return t&&(t.changes!==undefined||t.documentChanges!==undefined)&&(t.documentChanges===undefined||t.documentChanges.every((e=>{if(Wd.string(e.kind)){return Ff.is(e)||Gf.is(e)||Bf.is(e)}else{return Uf.is(e)}})))}e.is=t})(Kf||(Kf={}));class jf{constructor(e,t){this.edits=e;this.changeAnnotations=t}insert(e,t,n){let r;let i;if(n===undefined){r=Of.insert(e,t)}else if(Mf.is(n)){i=n;r=Df.insert(e,t,n)}else{this.assertChangeAnnotations(this.changeAnnotations);i=this.changeAnnotations.manage(n);r=Df.insert(e,t,i)}this.edits.push(r);if(i!==undefined){return i}}replace(e,t,n){let r;let i;if(n===undefined){r=Of.replace(e,t)}else if(Mf.is(n)){i=n;r=Df.replace(e,t,n)}else{this.assertChangeAnnotations(this.changeAnnotations);i=this.changeAnnotations.manage(n);r=Df.replace(e,t,i)}this.edits.push(r);if(i!==undefined){return i}}delete(e,t){let n;let r;if(t===undefined){n=Of.del(e)}else if(Mf.is(t)){r=t;n=Df.del(e,t)}else{this.assertChangeAnnotations(this.changeAnnotations);r=this.changeAnnotations.manage(t);n=Df.del(e,r)}this.edits.push(n);if(r!==undefined){return r}}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===undefined){throw new Error(`Text edit change is not configured to manage change annotations.`)}}}class Vf{constructor(e){this._annotations=e===undefined?Object.create(null):e;this._counter=0;this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(Mf.is(e)){n=e}else{n=this.nextId();t=e}if(this._annotations[n]!==undefined){throw new Error(`Id ${n} is already in use.`)}if(t===undefined){throw new Error(`No annotation provided for id ${n}`)}this._annotations[n]=t;this._size++;return n}nextId(){this._counter++;return this._counter.toString()}}class Wf{constructor(e){this._textEditChanges=Object.create(null);if(e!==undefined){this._workspaceEdit=e;if(e.documentChanges){this._changeAnnotations=new Vf(e.changeAnnotations);e.changeAnnotations=this._changeAnnotations.all();e.documentChanges.forEach((e=>{if(Uf.is(e)){const t=new jf(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))}else if(e.changes){Object.keys(e.changes).forEach((t=>{const n=new jf(e.changes[t]);this._textEditChanges[t]=n}))}}else{this._workspaceEdit={}}}get edit(){this.initDocumentChanges();if(this._changeAnnotations!==undefined){if(this._changeAnnotations.size===0){this._workspaceEdit.changeAnnotations=undefined}else{this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()}}return this._workspaceEdit}getTextEditChange(e){if(qf.is(e)){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[];const r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r);n=new jf(e,this._changeAnnotations);this._textEditChanges[t.uri]=n}return n}else{this.initChanges();if(this._workspaceEdit.changes===undefined){throw new Error("Workspace edit is not configured for normal text edit changes.")}let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n;t=new jf(n);this._textEditChanges[e]=t}return t}}initDocumentChanges(){if(this._workspaceEdit.documentChanges===undefined&&this._workspaceEdit.changes===undefined){this._changeAnnotations=new Vf;this._workspaceEdit.documentChanges=[];this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()}}initChanges(){if(this._workspaceEdit.documentChanges===undefined&&this._workspaceEdit.changes===undefined){this._workspaceEdit.changes=Object.create(null)}}createFile(e,t,n){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}let r;if(Pf.is(t)||Mf.is(t)){r=t}else{n=t}let i;let s;if(r===undefined){i=Ff.create(e,n)}else{s=Mf.is(r)?r:this._changeAnnotations.manage(r);i=Ff.create(e,n,s)}this._workspaceEdit.documentChanges.push(i);if(s!==undefined){return s}}renameFile(e,t,n,r){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}let i;if(Pf.is(n)||Mf.is(n)){i=n}else{r=n}let s;let a;if(i===undefined){s=Gf.create(e,t,r)}else{a=Mf.is(i)?i:this._changeAnnotations.manage(i);s=Gf.create(e,t,r,a)}this._workspaceEdit.documentChanges.push(s);if(a!==undefined){return a}}deleteFile(e,t,n){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}let r;if(Pf.is(t)||Mf.is(t)){r=t}else{n=t}let i;let s;if(r===undefined){i=Bf.create(e,n)}else{s=Mf.is(r)?r:this._changeAnnotations.manage(r);i=Bf.create(e,n,s)}this._workspaceEdit.documentChanges.push(i);if(s!==undefined){return s}}}var Hf;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.uri)}e.is=n})(Hf||(Hf={}));var zf;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.uri)&&Wd.integer(t.version)}e.is=n})(zf||(zf={}));var qf;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.uri)&&(t.version===null||Wd.integer(t.version))}e.is=n})(qf||(qf={}));var Yf;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.uri)&&Wd.string(t.languageId)&&Wd.integer(t.version)&&Wd.string(t.text)}e.is=n})(Yf||(Yf={}));var Xf;(function(e){e.PlainText="plaintext";e.Markdown="markdown";function t(t){const n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(Xf||(Xf={}));var Qf;(function(e){function t(e){const t=e;return Wd.objectLiteral(e)&&Xf.is(t.kind)&&Wd.string(t.value)}e.is=t})(Qf||(Qf={}));var Jf;(function(e){e.Text=1;e.Method=2;e.Function=3;e.Constructor=4;e.Field=5;e.Variable=6;e.Class=7;e.Interface=8;e.Module=9;e.Property=10;e.Unit=11;e.Value=12;e.Enum=13;e.Keyword=14;e.Snippet=15;e.Color=16;e.File=17;e.Reference=18;e.Folder=19;e.EnumMember=20;e.Constant=21;e.Struct=22;e.Event=23;e.Operator=24;e.TypeParameter=25})(Jf||(Jf={}));var Zf;(function(e){e.PlainText=1;e.Snippet=2})(Zf||(Zf={}));var ed;(function(e){e.Deprecated=1})(ed||(ed={}));var td;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){const t=e;return t&&Wd.string(t.newText)&&vf.is(t.insert)&&vf.is(t.replace)}e.is=n})(td||(td={}));var nd;(function(e){e.asIs=1;e.adjustIndentation=2})(nd||(nd={}));var rd;(function(e){function t(e){const t=e;return t&&(Wd.string(t.detail)||t.detail===undefined)&&(Wd.string(t.description)||t.description===undefined)}e.is=t})(rd||(rd={}));var id;(function(e){function t(e){return{label:e}}e.create=t})(id||(id={}));var sd;(function(e){function t(e,t){return{items:e?e:[],isIncomplete:!!t}}e.create=t})(sd||(sd={}));var ad;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(e){const t=e;return Wd.string(t)||Wd.objectLiteral(t)&&Wd.string(t.language)&&Wd.string(t.value)}e.is=n})(ad||(ad={}));var od;(function(e){function t(e){let t=e;return!!t&&Wd.objectLiteral(t)&&(Qf.is(t.contents)||ad.is(t.contents)||Wd.typedArray(t.contents,ad.is))&&(e.range===undefined||vf.is(e.range))}e.is=t})(od||(od={}));var cd;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(cd||(cd={}));var ud;(function(e){function t(e,t,...n){let r={label:e};if(Wd.defined(t)){r.documentation=t}if(Wd.defined(n)){r.parameters=n}else{r.parameters=[]}return r}e.create=t})(ud||(ud={}));var ld;(function(e){e.Text=1;e.Read=2;e.Write=3})(ld||(ld={}));var fd;(function(e){function t(e,t){let n={range:e};if(Wd.number(t)){n.kind=t}return n}e.create=t})(fd||(fd={}));var dd;(function(e){e.File=1;e.Module=2;e.Namespace=3;e.Package=4;e.Class=5;e.Method=6;e.Property=7;e.Field=8;e.Constructor=9;e.Enum=10;e.Interface=11;e.Function=12;e.Variable=13;e.Constant=14;e.String=15;e.Number=16;e.Boolean=17;e.Array=18;e.Object=19;e.Key=20;e.Null=21;e.EnumMember=22;e.Struct=23;e.Event=24;e.Operator=25;e.TypeParameter=26})(dd||(dd={}));var hd;(function(e){e.Deprecated=1})(hd||(hd={}));var pd;(function(e){function t(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};if(i){s.containerName=i}return s}e.create=t})(pd||(pd={}));var md;(function(e){function t(e,t,n,r){return r!==undefined?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}e.create=t})(md||(md={}));var gd;(function(e){function t(e,t,n,r,i,s){let a={name:e,detail:t,kind:n,range:r,selectionRange:i};if(s!==undefined){a.children=s}return a}e.create=t;function n(e){let t=e;return t&&Wd.string(t.name)&&Wd.number(t.kind)&&vf.is(t.range)&&vf.is(t.selectionRange)&&(t.detail===undefined||Wd.string(t.detail))&&(t.deprecated===undefined||Wd.boolean(t.deprecated))&&(t.children===undefined||Array.isArray(t.children))&&(t.tags===undefined||Array.isArray(t.tags))}e.is=n})(gd||(gd={}));var yd;(function(e){e.Empty="";e.QuickFix="quickfix";e.Refactor="refactor";e.RefactorExtract="refactor.extract";e.RefactorInline="refactor.inline";e.RefactorRewrite="refactor.rewrite";e.Source="source";e.SourceOrganizeImports="source.organizeImports";e.SourceFixAll="source.fixAll"})(yd||(yd={}));var Ad;(function(e){e.Invoked=1;e.Automatic=2})(Ad||(Ad={}));var Td;(function(e){function t(e,t,n){let r={diagnostics:e};if(t!==undefined&&t!==null){r.only=t}if(n!==undefined&&n!==null){r.triggerKind=n}return r}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.typedArray(t.diagnostics,bf.is)&&(t.only===undefined||Wd.typedArray(t.only,Wd.string))&&(t.triggerKind===undefined||t.triggerKind===Ad.Invoked||t.triggerKind===Ad.Automatic)}e.is=n})(Td||(Td={}));var vd;(function(e){function t(e,t,n){let r={title:e};let i=true;if(typeof t==="string"){i=false;r.kind=t}else if(_f.is(t)){r.command=t}else{r.edit=t}if(i&&n!==undefined){r.kind=n}return r}e.create=t;function n(e){let t=e;return t&&Wd.string(t.title)&&(t.diagnostics===undefined||Wd.typedArray(t.diagnostics,bf.is))&&(t.kind===undefined||Wd.string(t.kind))&&(t.edit!==undefined||t.command!==undefined)&&(t.command===undefined||_f.is(t.command))&&(t.isPreferred===undefined||Wd.boolean(t.isPreferred))&&(t.edit===undefined||Kf.is(t.edit))}e.is=n})(vd||(vd={}));var Ed;(function(e){function t(e,t){let n={range:e};if(Wd.defined(t)){n.data=t}return n}e.create=t;function n(e){let t=e;return Wd.defined(t)&&vf.is(t.range)&&(Wd.undefined(t.command)||_f.is(t.command))}e.is=n})(Ed||(Ed={}));var Rd;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.uinteger(t.tabSize)&&Wd.boolean(t.insertSpaces)}e.is=n})(Rd||(Rd={}));var kd;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&vf.is(t.range)&&(Wd.undefined(t.target)||Wd.string(t.target))}e.is=n})(kd||(kd={}));var xd;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return Wd.objectLiteral(n)&&vf.is(n.range)&&(n.parent===undefined||e.is(n.parent))}e.is=n})(xd||(xd={}));var Id;(function(e){e["namespace"]="namespace";e["type"]="type";e["class"]="class";e["enum"]="enum";e["interface"]="interface";e["struct"]="struct";e["typeParameter"]="typeParameter";e["parameter"]="parameter";e["variable"]="variable";e["property"]="property";e["enumMember"]="enumMember";e["event"]="event";e["function"]="function";e["method"]="method";e["macro"]="macro";e["keyword"]="keyword";e["modifier"]="modifier";e["comment"]="comment";e["string"]="string";e["number"]="number";e["regexp"]="regexp";e["operator"]="operator";e["decorator"]="decorator"})(Id||(Id={}));var Sd;(function(e){e["declaration"]="declaration";e["definition"]="definition";e["readonly"]="readonly";e["static"]="static";e["deprecated"]="deprecated";e["abstract"]="abstract";e["async"]="async";e["modification"]="modification";e["documentation"]="documentation";e["defaultLibrary"]="defaultLibrary"})(Sd||(Sd={}));var wd;(function(e){function t(e){const t=e;return Wd.objectLiteral(t)&&(t.resultId===undefined||typeof t.resultId==="string")&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==="number")}e.is=t})(wd||(wd={}));var Nd;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){const t=e;return t!==undefined&&t!==null&&vf.is(t.range)&&Wd.string(t.text)}e.is=n})(Nd||(Nd={}));var Cd;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){const t=e;return t!==undefined&&t!==null&&vf.is(t.range)&&Wd.boolean(t.caseSensitiveLookup)&&(Wd.string(t.variableName)||t.variableName===undefined)}e.is=n})(Cd||(Cd={}));var $d;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){const t=e;return t!==undefined&&t!==null&&vf.is(t.range)&&(Wd.string(t.expression)||t.expression===undefined)}e.is=n})($d||($d={}));var Ld;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){const t=e;return Wd.defined(t)&&vf.is(e.stoppedLocation)}e.is=n})(Ld||(Ld={}));var bd;(function(e){e.Type=1;e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(bd||(bd={}));var _d;(function(e){function t(e){return{value:e}}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&(t.tooltip===undefined||Wd.string(t.tooltip)||Qf.is(t.tooltip))&&(t.location===undefined||Ef.is(t.location))&&(t.command===undefined||_f.is(t.command))}e.is=n})(_d||(_d={}));var Od;(function(e){function t(e,t,n){const r={position:e,label:t};if(n!==undefined){r.kind=n}return r}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&Tf.is(t.position)&&(Wd.string(t.label)||Wd.typedArray(t.label,_d.is))&&(t.kind===undefined||bd.is(t.kind))&&t.textEdits===undefined||Wd.typedArray(t.textEdits,Of.is)&&(t.tooltip===undefined||Wd.string(t.tooltip)||Qf.is(t.tooltip))&&(t.paddingLeft===undefined||Wd.boolean(t.paddingLeft))&&(t.paddingRight===undefined||Wd.boolean(t.paddingRight))}e.is=n})(Od||(Od={}));var Pd;(function(e){function t(e){return{kind:"snippet",value:e}}e.createSnippet=t})(Pd||(Pd={}));var Md;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Md||(Md={}));var Dd;(function(e){function t(e){return{items:e}}e.create=t})(Dd||(Dd={}));var Ud;(function(e){e.Invoked=0;e.Automatic=1})(Ud||(Ud={}));var Fd;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(Fd||(Fd={}));var Gd;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Gd||(Gd={}));var Bd;(function(e){function t(e){const t=e;return Wd.objectLiteral(t)&&gf.is(t.uri)&&Wd.string(t.name)}e.is=t})(Bd||(Bd={}));const Kd=null&&["\n","\r\n","\r"];var jd;(function(e){function t(e,t,n,r){return new Vd(e,t,n,r)}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.uri)&&(Wd.undefined(t.languageId)||Wd.string(t.languageId))&&Wd.uinteger(t.lineCount)&&Wd.func(t.getText)&&Wd.func(t.positionAt)&&Wd.func(t.offsetAt)?true:false}e.is=n;function r(e,t){let n=e.getText();let r=i(t,((e,t)=>{let n=e.range.start.line-t.range.start.line;if(n===0){return e.range.start.character-t.range.start.character}return n}));let s=n.length;for(let i=r.length-1;i>=0;i--){let t=r[i];let a=e.offsetAt(t.range.start);let o=e.offsetAt(t.range.end);if(o<=s){n=n.substring(0,a)+t.newText+n.substring(o,n.length)}else{throw new Error("Overlapping edit")}s=a}return n}e.applyEdits=r;function i(e,t){if(e.length<=1){return e}const n=e.length/2|0;const r=e.slice(0,n);const s=e.slice(n);i(r,t);i(s,t);let a=0;let o=0;let c=0;while(a<r.length&&o<s.length){let n=t(r[a],s[o]);if(n<=0){e[c++]=r[a++]}else{e[c++]=s[o++]}}while(a<r.length){e[c++]=r[a++]}while(o<s.length){e[c++]=s[o++]}return e}})(jd||(jd={}));class Vd{constructor(e,t,n,r){this._uri=e;this._languageId=t;this._version=n;this._content=r;this._lineOffsets=undefined}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start);let n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text;this._version=t;this._lineOffsets=undefined}getLineOffsets(){if(this._lineOffsets===undefined){let e=[];let t=this._content;let n=true;for(let r=0;r<t.length;r++){if(n){e.push(r);n=false}let i=t.charAt(r);n=i==="\r"||i==="\n";if(i==="\r"&&r+1<t.length&&t.charAt(r+1)==="\n"){r++}}if(n&&t.length>0){e.push(t.length)}this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets();let n=0,r=t.length;if(r===0){return Tf.create(0,e)}while(n<r){let i=Math.floor((n+r)/2);if(t[i]>e){r=i}else{n=i+1}}let i=n-1;return Tf.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length){return this._content.length}else if(e.line<0){return 0}let n=t[e.line];let r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}var Wd;(function(e){const t=Object.prototype.toString;function n(e){return typeof e!=="undefined"}e.defined=n;function r(e){return typeof e==="undefined"}e.undefined=r;function i(e){return e===true||e===false}e.boolean=i;function s(e){return t.call(e)==="[object String]"}e.string=s;function a(e){return t.call(e)==="[object Number]"}e.number=a;function o(e,n,r){return t.call(e)==="[object Number]"&&n<=e&&e<=r}e.numberRange=o;function c(e){return t.call(e)==="[object Number]"&&-2147483648<=e&&e<=2147483647}e.integer=c;function u(e){return t.call(e)==="[object Number]"&&0<=e&&e<=2147483647}e.uinteger=u;function l(e){return t.call(e)==="[object Function]"}e.func=l;function f(e){return e!==null&&typeof e==="object"}e.objectLiteral=f;function d(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=d})(Wd||(Wd={}));class Hd{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(e){this.rootNode=new Qd(e);this.rootNode.root=this.rootNode;this.nodeStack=[this.rootNode];return this.rootNode}buildCompositeNode(e){const t=new Yd;t.grammarSource=e;t.root=this.rootNode;this.current.content.push(t);this.nodeStack.push(t);return t}buildLeafNode(e,t){const n=new qd(e.startOffset,e.image.length,R(e),e.tokenType,false);n.grammarSource=t;n.root=this.rootNode;this.current.content.push(n);return n}removeNode(e){const t=e.container;if(t){const n=t.content.indexOf(e);if(n>=0){t.content.splice(n,1)}}}construct(e){const t=this.current;if(typeof e.$type==="string"){this.current.astNode=e}e.$cstNode=t;const n=this.nodeStack.pop();if((n===null||n===void 0?void 0:n.content.length)===0){this.removeNode(n)}}addHiddenTokens(e){for(const t of e){const e=new qd(t.startOffset,t.image.length,R(t),t.tokenType,true);e.root=this.rootNode;this.addHiddenToken(this.rootNode,e)}}addHiddenToken(e,t){const{offset:n,end:r}=t;for(let i=0;i<e.content.length;i++){const s=e.content[i];const{offset:a,end:o}=s;if(c(s)&&n>a&&r<o){this.addHiddenToken(s,t);return}else if(r<=a){e.content.splice(i,0,t);return}}e.content.push(t)}}class zd{get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return false}get astNode(){var e,t;const n=typeof((e=this._astNode)===null||e===void 0?void 0:e.$type)==="string"?this._astNode:(t=this.container)===null||t===void 0?void 0:t.astNode;if(!n){throw new Error("This node has no associated AST element")}return n}set astNode(e){this._astNode=e}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}}class qd extends zd{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=false){super();this._hidden=i;this._offset=e;this._tokenType=r;this._length=t;this._range=n}}class Yd extends zd{constructor(){super(...arguments);this.content=new Xd(this)}get children(){return this.content}get offset(){var e,t;return(t=(e=this.firstNonHiddenNode)===null||e===void 0?void 0:e.offset)!==null&&t!==void 0?t:0}get length(){return this.end-this.offset}get end(){var e,t;return(t=(e=this.lastNonHiddenNode)===null||e===void 0?void 0:e.end)!==null&&t!==void 0?t:0}get range(){const e=this.firstNonHiddenNode;const t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===undefined){const{range:n}=e;const{range:r}=t;this._rangeCache={start:n.start,end:r.end.line<n.start.line?n.start:r.end}}return this._rangeCache}else{return{start:Tf.create(0,0),end:Tf.create(0,0)}}}get firstNonHiddenNode(){for(const e of this.content){if(!e.hidden){return e}}return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){const t=this.content[e];if(!t.hidden){return t}}return this.content[this.content.length-1]}}class Xd extends Array{constructor(e){super();this.parent=e;Object.setPrototypeOf(this,Xd.prototype)}push(...e){this.addParents(e);return super.push(...e)}unshift(...e){this.addParents(e);return super.unshift(...e)}splice(e,t,...n){this.addParents(n);return super.splice(e,t,...n)}addParents(e){for(const t of e){t.container=this.parent}}}class Qd extends Yd{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super();this._text="";this._text=e!==null&&e!==void 0?e:""}}const Jd=Symbol("Datatype");function Zd(e){return e.$type===Jd}const eh="";const th=e=>e.endsWith(eh)?e:e+eh;class nh{constructor(e){this._unorderedGroups=new Map;this.lexer=e.parser.Lexer;const t=this.lexer.definition;this.wrapper=new ch(t,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class rh extends nh{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e);this.nodeBuilder=new Hd;this.stack=[];this.assignmentMap=new Map;this.linker=e.references.Linker;this.converter=e.parser.ValueConverter;this.astReflection=e.shared.AstReflection}rule(e,t){const n=e.fragment?undefined:Mn(e)?Jd:Bn(e);const r=this.wrapper.DEFINE_RULE(th(e.name),this.startImplementation(n,t).bind(this));if(e.entry){this.mainRule=r}return r}parse(e){this.nodeBuilder.buildRootNode(e);const t=this.lexer.tokenize(e);this.wrapper.input=t.tokens;const n=this.mainRule.call(this.wrapper,{});this.nodeBuilder.addHiddenTokens(t.hidden);this.unorderedGroups.clear();return{value:n,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(e,t){return n=>{if(!this.isRecording()){const t={$type:e};this.stack.push(t);if(e===Jd){t.value=""}}let r;try{r=t(n)}catch(i){r=undefined}if(!this.isRecording()&&r===undefined){r=this.construct()}return r}}consume(e,t,n){const r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){const e=this.nodeBuilder.buildLeafNode(r,n);const{assignment:t,isCrossRef:i}=this.getAssignment(n);const s=this.current;if(t){const s=lt(n)?r.image:this.converter.convert(r.image,e);this.assign(t.operator,t.feature,s,e,i)}else if(Zd(s)){let t=r.image;if(!lt(n)){t=this.converter.convert(t,e).toString()}s.value+=t}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset==="number"&&!isNaN(e.endOffset)}subrule(e,t,n,r){let i;if(!this.isRecording()){i=this.nodeBuilder.buildCompositeNode(n)}const s=this.wrapper.wrapSubrule(e,t,r);if(!this.isRecording()&&i&&i.length>0){this.performSubruleAssignment(s,n,i)}}performSubruleAssignment(e,t,n){const{assignment:r,isCrossRef:i}=this.getAssignment(t);if(r){this.assign(r.operator,r.feature,e,n,i)}else if(!r){const t=this.current;if(Zd(t)){t.value+=e.toString()}else if(typeof e==="object"&&e){const n=e.$type;const r=this.assignWithoutOverride(e,t);if(n){r.$type=n}const i=r;this.stack.pop();this.stack.push(i)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(!n.$cstNode&&t.feature&&t.operator){n=this.construct(false);const e=n.$cstNode.feature;this.nodeBuilder.buildCompositeNode(e)}const r={$type:e};this.stack.pop();this.stack.push(r);if(t.feature&&t.operator){this.assign(t.operator,t.feature,n,n.$cstNode,false)}}}construct(e=true){if(this.isRecording()){return undefined}const t=this.current;Lt(t);this.nodeBuilder.construct(t);if(e){this.stack.pop()}if(Zd(t)){return this.converter.convert(t.value,t.$cstNode)}else{Kt(this.astReflection,t)}return t}getAssignment(e){if(!this.assignmentMap.has(e)){const t=bt(e,et);this.assignmentMap.set(e,{assignment:t,isCrossRef:t?it(t.terminal):false})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){const s=this.current;let a;if(i&&typeof n==="string"){a=this.linker.buildReference(s,t,r,n)}else{a=n}switch(e){case"=":{s[t]=a;break}case"?=":{s[t]=true;break}case"+=":{if(!Array.isArray(s[t])){s[t]=[]}s[t].push(a)}}}assignWithoutOverride(e,t){for(const[n,r]of Object.entries(t)){const t=e[n];if(t===undefined){e[n]=r}else if(Array.isArray(t)&&Array.isArray(r)){r.push(...t);e[n]=r}}return e}get definitionErrors(){return this.wrapper.definitionErrors}}class ih{buildMismatchTokenMessage(e){return io.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return io.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return io.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return io.buildEarlyExitMessage(e)}}class sh extends ih{buildMismatchTokenMessage({expected:e,actual:t}){const n=e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`;return`Expecting ${n} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class ah extends nh{constructor(){super(...arguments);this.tokens=[];this.elementStack=[];this.lastElementStack=[];this.nextTokenIndex=0;this.stackSize=0}action(){}construct(){return undefined}parse(e){this.resetState();const t=this.lexer.tokenize(e);this.tokens=t.tokens;this.wrapper.input=[...this.tokens];this.mainRule.call(this.wrapper,{});this.unorderedGroups.clear();return{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const n=this.wrapper.DEFINE_RULE(th(e.name),this.startImplementation(t).bind(this));if(e.entry){this.mainRule=n}return n}resetState(){this.elementStack=[];this.lastElementStack=[];this.nextTokenIndex=0;this.stackSize=0}startImplementation(e){return t=>{const n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;this.stackSize=e;return e}resetStackSize(e){this.removeUnexpectedElements();this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t);if(!this.isRecording()){this.lastElementStack=[...this.elementStack,n];this.nextTokenIndex=this.currIdx+1}}subrule(e,t,n,r){this.before(n);this.wrapper.wrapSubrule(e,t,r);this.after(n)}before(e){if(!this.isRecording()){this.elementStack.push(e)}}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);if(t>=0){this.elementStack.splice(t)}}}get currIdx(){return this.wrapper.currIdx}}const oh={recoveryEnabled:true,nodeLocationTracking:"full",skipValidations:true,errorMessageProvider:new sh};class ch extends Uu{constructor(e,t){const n=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},oh),{lookaheadStrategy:n?new qc({maxLookahead:t.maxLookahead}):new Kl}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}}function uh(e,t,n){const r=new Map;const i={parser:t,tokens:n,rules:r,ruleNames:new Map};lh(i,e);return t}function lh(e,t){const n=Tn(t,false);const r=g(t.rules).filter(be).filter((e=>n.has(e)));for(const i of r){const t=Object.assign(Object.assign({},e),{consume:1,optional:1,subrule:1,many:1,or:1});t.rules.set(i.name,e.parser.rule(i,fh(t,i.definition)))}}function fh(e,t,n=false){let r;if(lt(t)){r=Eh(e,t)}else if(Xe(t)){r=dh(e,t)}else if(et(t)){r=fh(e,t.terminal)}else if(it(t)){r=vh(e,t)}else if(gt(t)){r=hh(e,t)}else if(Je(t)){r=gh(e,t)}else if(xt(t)){r=yh(e,t)}else if(ct(t)){r=Ah(e,t)}else if(at(t)){const n=e.consume++;r=()=>e.parser.consume(n,to,t)}else{throw new G(t.$cstNode,`Unexpected element type: ${t.$type}`)}return Rh(e,n?undefined:Th(t),r,t.cardinality)}function dh(e,t){const n=Bn(t);return()=>e.parser.action(n,t)}function hh(e,t){const n=t.rule.ref;if(be(n)){const r=e.subrule++;const i=t.arguments.length>0?ph(n,t.arguments):()=>({});return s=>e.parser.subrule(r,kh(e,n),t,i(s))}else if(Ke(n)){const r=e.consume++;const i=Ih(e,n.name);return()=>e.parser.consume(r,i,t)}else if(!n){throw new G(t.$cstNode,`Undefined rule type: ${t.$type}`)}else{B(n)}}function ph(e,t){const n=t.map((e=>mh(e.value)));return t=>{const r={};for(let i=0;i<n.length;i++){const s=e.parameters[i];const a=n[i];r[s.name]=a(t)}return r}}function mh(e){if(de(e)){const t=mh(e.left);const n=mh(e.right);return e=>t(e)||n(e)}else if(le(e)){const t=mh(e.left);const n=mh(e.right);return e=>t(e)&&n(e)}else if(xe(e)){const t=mh(e.value);return e=>!t(e)}else if($e(e)){const t=e.parameter.ref.name;return e=>e!==undefined&&e[t]===true}else if(ce(e)){const t=Boolean(e.true);return()=>t}B(e)}function gh(e,t){if(t.elements.length===1){return fh(e,t.elements[0])}else{const n=[];for(const i of t.elements){const t={ALT:fh(e,i,true)};const r=Th(i);if(r){t.GATE=mh(r)}n.push(t)}const r=e.or++;return t=>e.parser.alternatives(r,n.map((e=>{const n={ALT:()=>e.ALT(t)};const r=e.GATE;if(r){n.GATE=()=>r(t)}return n})))}}function yh(e,t){if(t.elements.length===1){return fh(e,t.elements[0])}const n=[];for(const o of t.elements){const t={ALT:fh(e,o,true)};const r=Th(o);if(r){t.GATE=mh(r)}n.push(t)}const r=e.or++;const i=(e,t)=>{const n=t.getRuleStack().join("-");return`uGroup_${e}_${n}`};const s=t=>e.parser.alternatives(r,n.map(((n,s)=>{const a={ALT:()=>true};const o=e.parser;a.ALT=()=>{n.ALT(t);if(!o.isRecording()){const e=i(r,o);if(!o.unorderedGroups.get(e)){o.unorderedGroups.set(e,[])}const t=o.unorderedGroups.get(e);if(typeof(t===null||t===void 0?void 0:t[s])==="undefined"){t[s]=true}}};const c=n.GATE;if(c){a.GATE=()=>c(t)}else{a.GATE=()=>{const e=o.unorderedGroups.get(i(r,o));const t=!(e===null||e===void 0?void 0:e[s]);return t}}return a})));const a=Rh(e,Th(t),s,"*");return t=>{a(t);if(!e.parser.isRecording()){e.parser.unorderedGroups.delete(i(r,e.parser))}}}function Ah(e,t){const n=t.elements.map((t=>fh(e,t)));return e=>n.forEach((t=>t(e)))}function Th(e){if(ct(e)){return e.guardCondition}return undefined}function vh(e,t,n=t.terminal){if(!n){if(!t.type.ref){throw new Error("Could not resolve reference to type: "+t.type.$refText)}const n=$n(t.type.ref);const r=n===null||n===void 0?void 0:n.terminal;if(!r){throw new Error("Could not find name assignment for type: "+Bn(t.type.ref))}return vh(e,t,r)}else if(gt(n)&&be(n.rule.ref)){const r=e.subrule++;return i=>e.parser.subrule(r,kh(e,n.rule.ref),t,i)}else if(gt(n)&&Ke(n.rule.ref)){const r=e.consume++;const i=Ih(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}else if(lt(n)){const r=e.consume++;const i=Ih(e,n.value);return()=>e.parser.consume(r,i,t)}else{throw new Error("Could not build cross reference parser")}}function Eh(e,t){const n=e.consume++;const r=e.tokens[t.value];if(!r){throw new Error("Could not find token for keyword: "+t.value)}return()=>e.parser.consume(n,r,t)}function Rh(e,t,n,r){const i=t&&mh(t);if(!r){if(i){const t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:Pu(),GATE:()=>!i(r)}])}else{return n}}if(r==="*"){const t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):undefined})}else if(r==="+"){const t=e.many++;if(i){const r=e.or++;return s=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(s)}),GATE:()=>i(s)},{ALT:Pu(),GATE:()=>!i(s)}])}else{return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}}else if(r==="?"){const t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):undefined})}else{B(r)}}function kh(e,t){const n=xh(e,t);const r=e.rules.get(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function xh(e,t){if(be(t)){return t.name}else if(e.ruleNames.has(t)){return e.ruleNames.get(t)}else{let n=t;let r=n.$container;let i=t.$type;while(!be(r)){if(ct(r)||Je(r)||xt(r)){const e=r.elements.indexOf(n);i=e.toString()+":"+i}n=r;r=r.$container}const s=r;i=s.name+":"+i;e.ruleNames.set(t,i);return i}}function Ih(e,t){const n=e.tokens[t];if(!n)throw new Error(`Token "${t}" not found."`);return n}function Sh(e){const t=e.Grammar;const n=e.parser.Lexer;const r=new ah(e);uh(t,r,n.definition);r.finalize();return r}function wh(e){const t=Nh(e);t.finalize();return t}function Nh(e){const t=e.Grammar;const n=e.parser.Lexer;const r=new rh(e);return uh(t,r,n.definition)}class Ch{buildTokens(e,t){const n=g(Tn(e,false));const r=this.buildTerminalTokens(n);const i=this.buildKeywordTokens(n,r,t);r.forEach((e=>{const t=e.PATTERN;if(typeof t==="object"&&t&&"test"in t&&dn(t)){i.unshift(e)}else{i.push(e)}}));return i}buildTerminalTokens(e){return e.filter(Ke).filter((e=>!e.fragment)).map((e=>this.buildTerminalToken(e))).toArray()}buildTerminalToken(e){const t=Vn(e);const n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t;const r={name:e.name,PATTERN:n,LINE_BREAKS:true};if(e.hidden){r.GROUP=dn(t)?Ga.SKIPPED:"hidden"}return r}requiresCustomPattern(e){if(e.flags.includes("u")){return true}else if(e.source.includes("?<=")||e.source.includes("?<!")){return true}else{return false}}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(e,n)=>{t.lastIndex=n;const r=t.exec(e);return r}}buildKeywordTokens(e,t,n){return e.filter(be).flatMap((e=>Dt(e).filter(lt))).distinct((e=>e.value)).toArray().sort(((e,t)=>t.value.length-e.value.length)).map((e=>this.buildKeywordToken(e,t,Boolean(n===null||n===void 0?void 0:n.caseInsensitive))))}buildKeywordToken(e,t,n){return{name:e.value,PATTERN:this.buildKeywordPattern(e,n),LONGER_ALT:this.findLongerAlt(e,t)}}buildKeywordPattern(e,t){return t?new RegExp(pn(e.value)):e.value}findLongerAlt(e,t){return t.reduce(((t,n)=>{const r=n===null||n===void 0?void 0:n.PATTERN;if((r===null||r===void 0?void 0:r.source)&&mn("^"+r.source+"$",e.value)){t.push(n)}return t}),[])}}class $h{convert(e,t){let n=t.grammarSource;if(it(n)){n=En(n)}if(gt(n)){const r=n.rule.ref;if(!r){throw new Error("This cst node was not parsed by a rule.")}return this.runConverter(r,e,t)}return e}runConverter(e,t,n){var r;switch(e.name.toUpperCase()){case"INT":return Lh.convertInt(t);case"STRING":return Lh.convertString(t);case"ID":return Lh.convertID(t)}switch((r=jn(e))===null||r===void 0?void 0:r.toLowerCase()){case"number":return Lh.convertNumber(t);case"boolean":return Lh.convertBoolean(t);case"bigint":return Lh.convertBigint(t);case"date":return Lh.convertDate(t);default:return t}}}var Lh;(function(e){function t(e){let t="";for(let r=1;r<e.length-1;r++){const i=e.charAt(r);if(i==="\\"){const i=e.charAt(++r);t+=n(i)}else{t+=i}}return t}e.convertString=t;function n(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}function r(e){if(e.charAt(0)==="^"){return e.substring(1)}else{return e}}e.convertID=r;function i(e){return parseInt(e)}e.convertInt=i;function s(e){return BigInt(e)}e.convertBigint=s;function a(e){return new Date(e)}e.convertDate=a;function o(e){return Number(e)}e.convertNumber=o;function c(e){return e.toLowerCase()==="true"}e.convertBoolean=c})(Lh||(Lh={}));var bh=n(59850);function _h(){return new Promise((e=>{if(typeof setImmediate==="undefined"){setTimeout(e,0)}else{setImmediate(e)}}))}let Oh=0;let Ph=10;function Mh(){Oh=Date.now();return new CancellationTokenSource}function Dh(e){Ph=e}const Uh=Symbol("OperationCancelled");function Fh(e){return e===Uh}async function Gh(e){if(e===bh.CancellationToken.None){return}const t=Date.now();if(t-Oh>=Ph){Oh=t;await _h()}if(e.isCancellationRequested){throw Uh}}class Bh{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>{e(t);return this};this.reject=e=>{t(e);return this}}))}}class Kh{constructor(e,t,n,r){this._uri=e;this._languageId=t;this._version=n;this._content=r;this._lineOffsets=undefined}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start);const n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const n of e){if(Kh.isIncremental(n)){const e=zh(n.range);const t=this.offsetAt(e.start);const r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0);const s=Math.max(e.end.line,0);let a=this._lineOffsets;const o=Wh(n.text,false,t);if(s-i===o.length){for(let e=0,t=o.length;e<t;e++){a[e+i+1]=o[e]}}else{if(o.length<1e4){a.splice(i+1,s-i,...o)}else{this._lineOffsets=a=a.slice(0,i+1).concat(o,a.slice(s+1))}}const c=n.text.length-(r-t);if(c!==0){for(let e=i+1+o.length,t=a.length;e<t;e++){a[e]=a[e]+c}}}else if(Kh.isFull(n)){this._content=n.text;this._lineOffsets=undefined}else{throw new Error("Unknown change event received")}}this._version=t}getLineOffsets(){if(this._lineOffsets===undefined){this._lineOffsets=Wh(this._content,true)}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(r===0){return{line:0,character:e}}while(n<r){const i=Math.floor((n+r)/2);if(t[i]>e){r=i}else{n=i+1}}const i=n-1;e=this.ensureBeforeEOL(e,t[i]);return{line:i,character:e-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length){return this._content.length}else if(e.line<0){return 0}const n=t[e.line];if(e.character<=0){return n}const r=e.line+1<t.length?t[e.line+1]:this._content.length;const i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){while(e>t&&Hh(this._content.charCodeAt(e-1))){e--}return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return t!==undefined&&t!==null&&typeof t.text==="string"&&t.range!==undefined&&(t.rangeLength===undefined||typeof t.rangeLength==="number")}static isFull(e){const t=e;return t!==undefined&&t!==null&&typeof t.text==="string"&&t.range===undefined&&t.rangeLength===undefined}}var jh;(function(e){function t(e,t,n,r){return new Kh(e,t,n,r)}e.create=t;function n(e,t,n){if(e instanceof Kh){e.update(t,n);return e}else{throw new Error("TextDocument.update: document must be created by TextDocument.create")}}e.update=n;function r(e,t){const n=e.getText();const r=Vh(t.map(qh),((e,t)=>{const n=e.range.start.line-t.range.start.line;if(n===0){return e.range.start.character-t.range.start.character}return n}));let i=0;const s=[];for(const a of r){const t=e.offsetAt(a.range.start);if(t<i){throw new Error("Overlapping edit")}else if(t>i){s.push(n.substring(i,t))}if(a.newText.length){s.push(a.newText)}i=e.offsetAt(a.range.end)}s.push(n.substr(i));return s.join("")}e.applyEdits=r})(jh||(jh={}));function Vh(e,t){if(e.length<=1){return e}const n=e.length/2|0;const r=e.slice(0,n);const i=e.slice(n);Vh(r,t);Vh(i,t);let s=0;let a=0;let o=0;while(s<r.length&&a<i.length){const n=t(r[s],i[a]);if(n<=0){e[o++]=r[s++]}else{e[o++]=i[a++]}}while(s<r.length){e[o++]=r[s++]}while(a<i.length){e[o++]=i[a++]}return e}function Wh(e,t,n=0){const r=t?[n]:[];for(let i=0;i<e.length;i++){const t=e.charCodeAt(i);if(Hh(t)){if(t===13&&i+1<e.length&&e.charCodeAt(i+1)===10){i++}r.push(n+i+1)}}return r}function Hh(e){return e===13||e===10}function zh(e){const t=e.start;const n=e.end;if(t.line>n.line||t.line===n.line&&t.character>n.character){return{start:n,end:t}}return e}function qh(e){const t=zh(e.range);if(t!==e.range){return{newText:e.newText,range:t}}return e}var Yh=n(65606);var Xh;(()=>{"use strict";var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,a=0,o=0;o<=e.length;++o){if(o<e.length)n=e.charCodeAt(o);else{if(47===n)break;n=47}if(47===n){if(s===o-1||1===a);else if(s!==o-1&&2===a){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=o,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=o,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,o):r=e.slice(s+1,o),i=o-s-1;s=o,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=Yh.cwd()),a=e),t(a),0!==a.length&&(r=a+"/"+r,i=47===a.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var s=e.length,a=s-i,o=1;o<n.length&&47===n.charCodeAt(o);++o);for(var c=n.length-o,u=a<c?a:c,l=-1,f=0;f<=u;++f){if(f===u){if(c>u){if(47===n.charCodeAt(o+f))return n.slice(o+f+1);if(0===f)return n.slice(o+f)}else a>u&&(47===e.charCodeAt(i+f)?l=f:0===f&&(l=0));break}var d=e.charCodeAt(i+f);if(d!==n.charCodeAt(o+f))break;47===d&&(l=f)}var h="";for(f=i+l+1;f<=s;++f)f!==s&&47!==e.charCodeAt(f)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(o+l):(o+=l,47===n.charCodeAt(o)&&++o,n.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,a=e.length-1;a>=1;--a)if(47===(n=e.charCodeAt(a))){if(!s){i=a;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var o=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!a){i=r+1;break}}else-1===c&&(a=!1,c=r+1),o>=0&&(u===n.charCodeAt(o)?-1==--o&&(s=r):(o=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){i=r+1;break}}else-1===s&&(a=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,a=0,o=e.length-1;o>=0;--o){var c=e.charCodeAt(o);if(47!==c)-1===i&&(s=!1,i=o+1),46===c?-1===n?n=o:1!==a&&(a=1):-1!==n&&(a=-1);else if(!s){r=o+1;break}}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var a=-1,o=0,c=-1,u=!0,l=e.length-1,f=0;l>=r;--l)if(47!==(i=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===i?-1===a?a=l:1!==f&&(f=1):-1!==a&&(f=-1);else if(!u){o=l+1;break}return-1===a||-1===c||0===f||1===f&&a===c-1&&a===o+1?-1!==c&&(n.base=n.name=0===o&&s?e.slice(1,c):e.slice(o,c)):(0===o&&s?(n.name=e.slice(1,a),n.base=e.slice(1,c)):(n.name=e.slice(o,a),n.base=e.slice(o,c)),n.ext=e.slice(a,c)),o>0?n.dir=e.slice(0,o-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>l,Utils:()=>x}),"object"==typeof Yh)e="win32"===Yh.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function a(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const o="",c="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class l{static isUri(e){return e instanceof l||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||o,this.authority=e.authority||o,this.path=e.path||o,this.query=e.query||o,this.fragment=e.fragment||o):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||o,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||o),this.query=r||o,this.fragment=i||o,a(this,s))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=o),void 0===n?n=this.authority:null===n&&(n=o),void 0===r?r=this.path:null===r&&(r=o),void 0===i?i=this.query:null===i&&(i=o),void 0===s?s=this.fragment:null===s&&(s=o),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new d(t,n,r,i,s)}static parse(e,t=!1){const n=u.exec(e);return n?new d(n[2]||o,v(n[4]||o),v(n[5]||o),v(n[7]||o),v(n[9]||o),t):new d(o,o,o,o,o)}static file(t){let n=o;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(n=t.substring(2),t=c):(n=t.substring(2,e),t=t.substring(e)||c)}return new d("file",n,t,o,o)}static from(e){const t=new d(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof l)return e;{const t=new d(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}const f=e?1:void 0;class d extends l{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const h={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function p(e,t,n){let r,i=-1;for(let s=0;s<e.length;s++){const a=e.charCodeAt(s);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||t&&47===a||n&&91===a||n&&93===a||n&&58===a)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=h[a];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function m(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=h[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function g(t,n){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function y(e,t){const n=t?m:p;let r="",{scheme:i,authority:s,path:a,query:o,fragment:u}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=c,r+=c),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){const e=a.charCodeAt(1);e>=65&&e<=90&&(a=`/${String.fromCharCode(e+32)}:${a.substr(3)}`)}else if(a.length>=2&&58===a.charCodeAt(1)){const e=a.charCodeAt(0);e>=65&&e<=90&&(a=`${String.fromCharCode(e+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),u&&(r+="#",r+=t?u:p(u,!1,!1)),r}function A(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+A(e.substr(3)):e}}const T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(T)?e.replace(T,(e=>A(e))):e}var E=n(470);const R=E.posix||E,k="/";var x;!function(e){e.joinPath=function(e,...t){return e.with({path:R.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==k&&(n=k+n,r=!0);let i=R.resolve(n,...t);return r&&i[0]===k&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===k)return e;let t=R.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return R.basename(e.path)},e.extname=function(e){return R.extname(e.path)}}(x||(x={}))})(),Xh=r})();const{URI:Qh,Utils:Jh}=Xh;var Zh;(function(e){e.basename=Jh.basename;e.dirname=Jh.dirname;e.extname=Jh.extname;e.joinPath=Jh.joinPath;e.resolvePath=Jh.resolvePath;function t(e,t){return(e===null||e===void 0?void 0:e.toString())===(t===null||t===void 0?void 0:t.toString())}e.equals=t;function n(e,t){const n=typeof e==="string"?e:e.path;const r=typeof t==="string"?t:t.path;const i=n.split("/").filter((e=>e.length>0));const s=r.split("/").filter((e=>e.length>0));let a=0;for(;a<i.length;a++){if(i[a]!==s[a]){break}}const o="../".repeat(i.length-a);const c=s.slice(a).join("/");return o+c}e.relative=n})(Zh||(Zh={}));var ep;(function(e){e[e["Changed"]=0]="Changed";e[e["Parsed"]=1]="Parsed";e[e["IndexedContent"]=2]="IndexedContent";e[e["ComputedScopes"]=3]="ComputedScopes";e[e["Linked"]=4]="Linked";e[e["IndexedReferences"]=5]="IndexedReferences";e[e["Validated"]=6]="Validated"})(ep||(ep={}));class tp{constructor(e){this.serviceRegistry=e.ServiceRegistry;this.textDocuments=e.workspace.TextDocuments;this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=bh.CancellationToken.None){const n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){t=t!==null&&t!==void 0?t:Qh.parse(e.uri);if(n){return this.createAsync(t,e,n)}else{return this.create(t,e)}}fromString(e,t,n){if(n){return this.createAsync(t,e,n)}else{return this.create(t,e)}}fromModel(e,t){return this.create(t,{$model:e})}create(e,t){if(typeof t==="string"){const n=this.parse(e,t);return this.createLangiumDocument(n,e,undefined,t)}else if("$model"in t){const n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{const n=this.parse(e,t.getText());return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,n){if(typeof t==="string"){const r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,undefined,t)}else{const r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n){i={parseResult:e,uri:t,state:ep.Parsed,references:[],textDocument:n}}else{const n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:ep.Parsed,references:[],get textDocument(){return n()}}}e.value.$document=i;return i}async update(e,t){var n,r;const i=(n=e.parseResult.value.$cstNode)===null||n===void 0?void 0:n.root.fullText;const s=(r=this.textDocuments)===null||r===void 0?void 0:r.get(e.uri.toString());const a=s?s.getText():await this.fileSystemProvider.readFile(e.uri);if(s){Object.defineProperty(e,"textDocument",{value:s})}else{const t=this.createTextDocumentGetter(e.uri,a);Object.defineProperty(e,"textDocument",{get:t})}if(i!==a){e.parseResult=await this.parseAsync(e.uri,a,t);e.parseResult.value.$document=e}e.state=ep.Parsed;return e}parse(e,t){const n=this.serviceRegistry.getServices(e);return n.parser.LangiumParser.parse(t)}parseAsync(e,t,n){const r=this.serviceRegistry.getServices(e);return r.parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){const n=this.serviceRegistry;let r=undefined;return()=>r!==null&&r!==void 0?r:r=jh.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t!==null&&t!==void 0?t:"")}}class np{constructor(e){this.documentMap=new Map;this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return g(this.documentMap.values())}addDocument(e){const t=e.uri.toString();if(this.documentMap.has(t)){throw new Error(`A document with the URI '${t}' is already present.`)}this.documentMap.set(t,e)}getDocument(e){const t=e.toString();return this.documentMap.get(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);if(n){return n}n=await this.langiumDocumentFactory.fromUri(e,t);this.addDocument(n);return n}createDocument(e,t,n){if(n){return this.langiumDocumentFactory.fromString(t,e,n).then((e=>{this.addDocument(e);return e}))}else{const n=this.langiumDocumentFactory.fromString(t,e);this.addDocument(n);return n}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const t=e.toString();const n=this.documentMap.get(t);if(n){n.state=ep.Changed;n.precomputedScopes=undefined;n.references=[];n.diagnostics=undefined}return n}deleteDocument(e){const t=e.toString();const n=this.documentMap.get(t);if(n){n.state=ep.Changed;this.documentMap.delete(t)}return n}}class rp{constructor(e){this.reflection=e.shared.AstReflection;this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments;this.scopeProvider=e.references.ScopeProvider;this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,t=bh.CancellationToken.None){for(const n of Ut(e.parseResult.value)){await Gh(t);Gt(n).forEach((t=>this.doLink(t,e)))}}doLink(e,t){const n=e.reference;if(n._ref===undefined){try{const t=this.getCandidate(e);if(a(t)){n._ref=t}else{n._nodeDescription=t;if(this.langiumDocuments().hasDocument(t.documentUri)){const r=this.loadAstNode(t);n._ref=r!==null&&r!==void 0?r:this.createLinkingError(e,t)}}}catch(r){n._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${n.$refText}': ${r}`})}}t.references.push(n)}unlink(e){for(const t of e.references){delete t._ref;delete t._nodeDescription}e.references=[]}getCandidate(e){const t=this.scopeProvider.getScope(e);const n=t.getElement(e.reference.$refText);return n!==null&&n!==void 0?n:this.createLinkingError(e)}buildReference(e,t,n,i){const o=this;const c={$refNode:n,$refText:i,get ref(){var n;if(r(this._ref)){return this._ref}else if(s(this._nodeDescription)){const n=o.loadAstNode(this._nodeDescription);this._ref=n!==null&&n!==void 0?n:o.createLinkingError({reference:c,container:e,property:t},this._nodeDescription)}else if(this._ref===undefined){const r=o.getLinkedNode({reference:c,container:e,property:t});if(r.error&&Ot(e).state<ep.ComputedScopes){return undefined}this._ref=(n=r.node)!==null&&n!==void 0?n:r.error;this._nodeDescription=r.descr}return r(this._ref)?this._ref:undefined},get $nodeDescription(){return this._nodeDescription},get error(){return a(this._ref)?this._ref:undefined}};return c}getLinkedNode(e){try{const t=this.getCandidate(e);if(a(t)){return{error:t}}const n=this.loadAstNode(t);if(n){return{node:n,descr:t}}else{return{descr:t,error:this.createLinkingError(e,t)}}}catch(t){return{error:Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${e.reference.$refText}': ${t}`})}}}loadAstNode(e){if(e.node){return e.node}const t=this.langiumDocuments().getDocument(e.documentUri);if(!t){return undefined}return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){const n=Ot(e.container);if(n.state<ep.ComputedScopes){console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`)}const r=this.reflection.getReferenceType(e);return Object.assign(Object.assign({},e),{message:`Could not resolve reference to ${r} named '${e.reference.$refText}'.`,targetDescription:t})}}function ip(e){return typeof e.name==="string"}class sp{getName(e){if(ip(e)){return e.name}return undefined}getNameNode(e){return xn(e.$cstNode,"name")}}class ap{constructor(e){this.nameProvider=e.references.NameProvider;this.index=e.shared.workspace.IndexManager;this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){const t=Cn(e);const n=e.astNode;if(t&&n){const r=n[t.feature];if(i(r)){return r.ref}else if(Array.isArray(r)){for(const t of r){if(i(t)&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end){return t.ref}}}}if(n){const t=this.nameProvider.getNameNode(n);if(t&&(t===e||E(e,t))){return n}}}return undefined}findDeclarationNode(e){const t=this.findDeclaration(e);if(t===null||t===void 0?void 0:t.$cstNode){const e=this.nameProvider.getNameNode(t);return e!==null&&e!==void 0?e:t.$cstNode}return undefined}findReferences(e,t){const n=[];if(t.includeDeclaration){const t=this.getReferenceToSelf(e);if(t){n.push(t)}}let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));if(t.documentUri){r=r.filter((e=>Zh.equals(e.sourceUri,t.documentUri)))}n.push(...r);return g(n)}getReferenceToSelf(e){const t=this.nameProvider.getNameNode(e);if(t){const n=Ot(e);const r=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:r,targetUri:n.uri,targetPath:r,segment:k(t),local:true}}return undefined}}class op{constructor(e){this.map=new Map;if(e){for(const[t,n]of e){this.add(t,n)}}}get size(){return A.sum(g(this.map.values()).map((e=>e.length)))}clear(){this.map.clear()}delete(e,t){if(t===undefined){return this.map.delete(e)}else{const n=this.map.get(e);if(n){const r=n.indexOf(t);if(r>=0){if(n.length===1){this.map.delete(e)}else{n.splice(r,1)}return true}}return false}}get(e){var t;return(t=this.map.get(e))!==null&&t!==void 0?t:[]}has(e,t){if(t===undefined){return this.map.has(e)}else{const n=this.map.get(e);if(n){return n.indexOf(t)>=0}return false}}add(e,t){if(this.map.has(e)){this.map.get(e).push(t)}else{this.map.set(e,[t])}return this}addAll(e,t){if(this.map.has(e)){this.map.get(e).push(...t)}else{this.map.set(e,Array.from(t))}return this}forEach(e){this.map.forEach(((t,n)=>t.forEach((t=>e(t,n,this)))))}[Symbol.iterator](){return this.entries().iterator()}entries(){return g(this.map.entries()).flatMap((([e,t])=>t.map((t=>[e,t]))))}keys(){return g(this.map.keys())}values(){return g(this.map.values()).flat()}entriesGroupedByKey(){return g(this.map.entries())}}class cp{get size(){return this.map.size}constructor(e){this.map=new Map;this.inverse=new Map;if(e){for(const[t,n]of e){this.set(t,n)}}}clear(){this.map.clear();this.inverse.clear()}set(e,t){this.map.set(e,t);this.inverse.set(t,e);return this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);if(t!==undefined){this.map.delete(e);this.inverse.delete(t);return true}return false}}class up{constructor(e){this.nameProvider=e.references.NameProvider;this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=bh.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,undefined,t)}async computeExportsForNode(e,t,n=Mt,r=bh.CancellationToken.None){const i=[];this.exportNode(e,i,t);for(const s of n(e)){await Gh(r);this.exportNode(s,i,t)}return i}exportNode(e,t,n){const r=this.nameProvider.getName(e);if(r){t.push(this.descriptions.createDescription(e,r,n))}}async computeLocalScopes(e,t=bh.CancellationToken.None){const n=e.parseResult.value;const r=new op;for(const i of Dt(n)){await Gh(t);this.processNode(i,e,r)}return r}processNode(e,t,n){const r=e.$container;if(r){const i=this.nameProvider.getName(e);if(i){n.add(r,this.descriptions.createDescription(e,i,t))}}}}class lp{constructor(e,t,n){var r;this.elements=e;this.outerScope=t;this.caseInsensitive=(r=n===null||n===void 0?void 0:n.caseInsensitive)!==null&&r!==void 0?r:false}getAllElements(){if(this.outerScope){return this.elements.concat(this.outerScope.getAllElements())}else{return this.elements}}getElement(e){const t=this.caseInsensitive?this.elements.find((t=>t.name.toLowerCase()===e.toLowerCase())):this.elements.find((t=>t.name===e));if(t){return t}if(this.outerScope){return this.outerScope.getElement(e)}return undefined}}class fp{constructor(e,t,n){var r;this.elements=new Map;this.caseInsensitive=(r=n===null||n===void 0?void 0:n.caseInsensitive)!==null&&r!==void 0?r:false;for(const i of e){const e=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(e,i)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;const n=this.elements.get(t);if(n){return n}if(this.outerScope){return this.outerScope.getElement(e)}return undefined}getAllElements(){let e=g(this.elements.values());if(this.outerScope){e=e.concat(this.outerScope.getAllElements())}return e}}const dp={getElement(){return undefined},getAllElements(){return p}};class hp{constructor(){this.toDispose=[];this.isDisposed=false}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed();this.clear();this.isDisposed=true;this.toDispose.forEach((e=>e.dispose()))}throwIfDisposed(){if(this.isDisposed){throw new Error("This cache has already been disposed")}}}class pp extends hp{constructor(){super(...arguments);this.cache=new Map}has(e){this.throwIfDisposed();return this.cache.has(e)}set(e,t){this.throwIfDisposed();this.cache.set(e,t)}get(e,t){this.throwIfDisposed();if(this.cache.has(e)){return this.cache.get(e)}else if(t){const n=t();this.cache.set(e,n);return n}else{return undefined}}delete(e){this.throwIfDisposed();return this.cache.delete(e)}clear(){this.throwIfDisposed();this.cache.clear()}}class mp extends hp{constructor(e){super();this.cache=new Map;this.converter=e!==null&&e!==void 0?e:e=>e}has(e,t){this.throwIfDisposed();return this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed();this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();const r=this.cacheForContext(e);if(r.has(t)){return r.get(t)}else if(n){const e=n();r.set(t,e);return e}else{return undefined}}delete(e,t){this.throwIfDisposed();return this.cacheForContext(e).delete(t)}clear(e){this.throwIfDisposed();if(e){const t=this.converter(e);this.cache.delete(t)}else{this.cache.clear()}}cacheForContext(e){const t=this.converter(e);let n=this.cache.get(t);if(!n){n=new Map;this.cache.set(t,n)}return n}}class gp extends mp{constructor(e){super((e=>e.toString()));this.onDispose(e.workspace.DocumentBuilder.onUpdate(((e,t)=>{const n=e.concat(t);for(const r of n){this.clear(r)}})))}}class yp extends pp{constructor(e){super();this.onDispose(e.workspace.DocumentBuilder.onUpdate((()=>{this.clear()})))}}class Ap{constructor(e){this.reflection=e.shared.AstReflection;this.nameProvider=e.references.NameProvider;this.descriptions=e.workspace.AstNodeDescriptionProvider;this.indexManager=e.shared.workspace.IndexManager;this.globalScopeCache=new yp(e.shared)}getScope(e){const t=[];const n=this.reflection.getReferenceType(e);const r=Ot(e.container).precomputedScopes;if(r){let i=e.container;do{const e=r.get(i);if(e.length>0){t.push(g(e).filter((e=>this.reflection.isSubtype(e.type,n))))}i=i.$container}while(i)}let i=this.getGlobalScope(n,e);for(let s=t.length-1;s>=0;s--){i=this.createScope(t[s],i)}return i}createScope(e,t,n){return new lp(g(e),t,n)}createScopeForNodes(e,t,n){const r=g(e).map((e=>{const t=this.nameProvider.getName(e);if(t){return this.descriptions.createDescription(e,t)}return undefined})).nonNullable();return new lp(r,t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,(()=>new fp(this.indexManager.allElements(e))))}}function Tp(e){return typeof e.$comment==="string"}function vp(e){return typeof e==="object"&&!!e&&("$ref"in e||"$error"in e)}class Ep{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]);this.langiumDocuments=e.shared.workspace.LangiumDocuments;this.astNodeLocator=e.workspace.AstNodeLocator;this.nameProvider=e.references.NameProvider;this.commentProvider=e.documentation.CommentProvider}serialize(e,t={}){const n=t===null||t===void 0?void 0:t.replacer;const r=(e,n)=>this.replacer(e,n,t);const i=n?(e,t)=>n(e,t,r):r;try{this.currentDocument=Ot(e);return JSON.stringify(e,i,t===null||t===void 0?void 0:t.space)}finally{this.currentDocument=undefined}}deserialize(e,t={}){const n=JSON.parse(e);this.linkNode(n,n,t);return n}replacer(e,t,{refText:n,sourceText:s,textRegions:a,comments:o,uriConverter:c}){var u,l,f,d;if(this.ignoreProperties.has(e)){return undefined}else if(i(t)){const e=t.ref;const r=n?t.$refText:undefined;if(e){const n=Ot(e);let i="";if(this.currentDocument&&this.currentDocument!==n){if(c){i=c(n.uri,t)}else{i=n.uri.toString()}}const s=this.astNodeLocator.getAstNodePath(e);return{$ref:`${i}#${s}`,$refText:r}}else{return{$error:(l=(u=t.error)===null||u===void 0?void 0:u.message)!==null&&l!==void 0?l:"Could not resolve reference",$refText:r}}}else if(r(t)){let n=undefined;if(a){n=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},t));if((!e||t.$document)&&(n===null||n===void 0?void 0:n.$textRegion)){n.$textRegion.documentURI=(f=this.currentDocument)===null||f===void 0?void 0:f.uri.toString()}}if(s&&!e){n!==null&&n!==void 0?n:n=Object.assign({},t);n.$sourceText=(d=t.$cstNode)===null||d===void 0?void 0:d.text}if(o){n!==null&&n!==void 0?n:n=Object.assign({},t);const e=this.commentProvider.getComment(t);if(e){n.$comment=e.replace(/\r/g,"")}}return n!==null&&n!==void 0?n:t}else{return t}}addAstNodeRegionWithAssignmentsTo(e){const t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){const n=e.$textRegion=t(e.$cstNode);const r=n.assignments={};Object.keys(e).filter((e=>!e.startsWith("$"))).forEach((n=>{const i=kn(e.$cstNode,n).map(t);if(i.length!==0){r[n]=i}}));return e}return undefined}linkNode(e,t,n,i,s,a){for(const[c,u]of Object.entries(e)){if(Array.isArray(u)){for(let i=0;i<u.length;i++){const s=u[i];if(vp(s)){u[i]=this.reviveReference(e,c,t,s,n)}else if(r(s)){this.linkNode(s,t,n,e,c,i)}}}else if(vp(u)){e[c]=this.reviveReference(e,c,t,u,n)}else if(r(u)){this.linkNode(u,t,n,e,c)}}const o=e;o.$container=i;o.$containerProperty=s;o.$containerIndex=a}reviveReference(e,t,n,i,s){let a=i.$refText;let o=i.$error;if(i.$ref){const e=this.getRefNode(n,i.$ref,s.uriConverter);if(r(e)){if(!a){a=this.nameProvider.getName(e)}return{$refText:a!==null&&a!==void 0?a:"",ref:e}}else{o=e}}if(o){const n={$refText:a!==null&&a!==void 0?a:""};n.error={container:e,property:t,message:o,reference:n};return n}else{return undefined}}getRefNode(e,t,n){try{const r=t.indexOf("#");if(r===0){const n=this.astNodeLocator.getAstNode(e,t.substring(1));if(!n){return"Could not resolve path: "+t}return n}if(r<0){const e=n?n(t):Qh.parse(t);const r=this.langiumDocuments.getDocument(e);if(!r){return"Could not find document for URI: "+t}return r.parseResult.value}const i=n?n(t.substring(0,r)):Qh.parse(t.substring(0,r));const s=this.langiumDocuments.getDocument(i);if(!s){return"Could not find document for URI: "+t}if(r===t.length-1){return s.parseResult.value}const a=this.astNodeLocator.getAstNode(s.parseResult.value,t.substring(r+1));if(!a){return"Could not resolve URI: "+t}return a}catch(r){return String(r)}}}class Rp{register(e){if(!this.singleton&&!this.map){this.singleton=e;return}if(!this.map){this.map={};if(this.singleton){for(const e of this.singleton.LanguageMetaData.fileExtensions){this.map[e]=this.singleton}this.singleton=undefined}}for(const t of e.LanguageMetaData.fileExtensions){if(this.map[t]!==undefined&&this.map[t]!==e){console.warn(`The file extension ${t} is used by multiple languages. It is now assigned to '${e.LanguageMetaData.languageId}'.`)}this.map[t]=e}}getServices(e){if(this.singleton!==undefined){return this.singleton}if(this.map===undefined){throw new Error("The service registry is empty. Use `register` to register the services of a language.")}const t=Zh.extname(e);const n=this.map[t];if(!n){throw new Error(`The service registry contains no services for the extension '${t}'.`)}return n}get all(){if(this.singleton!==undefined){return[this.singleton]}if(this.map!==undefined){return Object.values(this.map)}return[]}}function kp(e){return{code:e}}var xp;(function(e){e.all=["fast","slow","built-in"]})(xp||(xp={}));class Ip{constructor(e){this.entries=new op;this.reflection=e.shared.AstReflection}register(e,t=this,n="fast"){if(n==="built-in"){throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.")}for(const[r,i]of Object.entries(e)){const e=i;if(Array.isArray(e)){for(const i of e){const e={check:this.wrapValidationException(i,t),category:n};this.addEntry(r,e)}}else if(typeof e==="function"){const i={check:this.wrapValidationException(e,t),category:n};this.addEntry(r,i)}}}wrapValidationException(e,t){return async(n,r,i)=>{try{await e.call(t,n,r,i)}catch(s){if(Fh(s)){throw s}console.error("An error occurred during validation:",s);const e=s instanceof Error?s.message:String(s);if(s instanceof Error&&s.stack){console.error(s.stack)}r("error","An error occurred during validation: "+e,{node:n})}}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(const n of this.reflection.getAllSubTypes(e)){this.entries.add(n,t)}}getChecks(e,t){let n=g(this.entries.get(e)).concat(this.entries.get("AstNode"));if(t){n=n.filter((e=>t.includes(e.category)))}return n.map((e=>e.check))}}class Sp{constructor(e){this.validationRegistry=e.validation.ValidationRegistry;this.metadata=e.LanguageMetaData}async validateDocument(e,t={},n=bh.CancellationToken.None){const r=e.parseResult;const i=[];await Gh(n);if(!t.categories||t.categories.includes("built-in")){this.processLexingErrors(r,i,t);if(t.stopAfterLexingErrors&&i.some((e=>{var t;return((t=e.data)===null||t===void 0?void 0:t.code)===Cp.LexingError}))){return i}this.processParsingErrors(r,i,t);if(t.stopAfterParsingErrors&&i.some((e=>{var t;return((t=e.data)===null||t===void 0?void 0:t.code)===Cp.ParsingError}))){return i}this.processLinkingErrors(e,i,t);if(t.stopAfterLinkingErrors&&i.some((e=>{var t;return((t=e.data)===null||t===void 0?void 0:t.code)===Cp.LinkingError}))){return i}}try{i.push(...await this.validateAst(r.value,t,n))}catch(s){if(Fh(s)){throw s}console.error("An error occurred during validation:",s)}await Gh(n);return i}processLexingErrors(e,t,n){for(const r of e.lexerErrors){const e={severity:Np("error"),range:{start:{line:r.line-1,character:r.column-1},end:{line:r.line-1,character:r.column+r.length-1}},message:r.message,data:kp(Cp.LexingError),source:this.getSource()};t.push(e)}}processParsingErrors(e,t,n){for(const r of e.parserErrors){let e=undefined;if(isNaN(r.token.startOffset)){if("previousToken"in r){const t=r.previousToken;if(!isNaN(t.startOffset)){const n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}else{const t={line:0,character:0};e={start:t,end:t}}}}else{e=R(r.token)}if(e){const n={severity:Np("error"),range:e,message:r.message,data:kp(Cp.ParsingError),source:this.getSource()};t.push(n)}}}processLinkingErrors(e,t,n){for(const r of e.references){const e=r.error;if(e){const n={node:e.container,property:e.property,index:e.index,data:{code:Cp.LinkingError,containerType:e.container.$type,property:e.property,refText:e.reference.$refText}};t.push(this.toDiagnostic("error",e.message,n))}}}async validateAst(e,t,n=bh.CancellationToken.None){const r=[];const i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};await Promise.all(Ut(e).map((async e=>{await Gh(n);const r=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of r){await t(e,i,n)}})));return r}toDiagnostic(e,t,n){return{message:t,range:wp(n),severity:Np(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function wp(e){if(e.range){return e.range}let t;if(typeof e.property==="string"){t=xn(e.node.$cstNode,e.property,e.index)}else if(typeof e.keyword==="string"){t=wn(e.node.$cstNode,e.keyword,e.index)}t!==null&&t!==void 0?t:t=e.node.$cstNode;if(!t){return{start:{line:0,character:0},end:{line:0,character:0}}}return t.range}function Np(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}var Cp;(function(e){e.LexingError="lexing-error";e.ParsingError="parsing-error";e.LinkingError="linking-error"})(Cp||(Cp={}));class $p{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator;this.nameProvider=e.references.NameProvider}createDescription(e,t,n=Ot(e)){t!==null&&t!==void 0?t:t=this.nameProvider.getName(e);const r=this.astNodeLocator.getAstNodePath(e);if(!t){throw new Error(`Node at path ${r} has no name.`)}let i;const s=()=>{var t;return i!==null&&i!==void 0?i:i=k((t=this.nameProvider.getNameNode(e))!==null&&t!==void 0?t:e.$cstNode)};return{node:e,name:t,get nameSegment(){return s()},selectionSegment:k(e.$cstNode),type:e.$type,documentUri:n.uri,path:r}}}class Lp{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=bh.CancellationToken.None){const n=[];const r=e.parseResult.value;for(const i of Ut(r)){await Gh(t);Gt(i).filter((e=>!a(e))).forEach((e=>{const t=this.createDescription(e);if(t){n.push(t)}}))}return n}createDescription(e){const t=e.reference.$nodeDescription;const n=e.reference.$refNode;if(!t||!n){return undefined}const r=Ot(e.container).uri;return{sourceUri:r,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:t.documentUri,targetPath:t.path,segment:k(n),local:Zh.equals(t.documentUri,r)}}}class bp{constructor(){this.segmentSeparator="/";this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container);const n=this.getPathSegment(e);const r=t+this.segmentSeparator+n;return r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e){throw new Error("Missing '$containerProperty' in AST node.")}if(t!==undefined){return e+this.indexSeparator+t}return e}getAstNode(e,t){const n=t.split(this.segmentSeparator);return n.reduce(((e,t)=>{if(!e||t.length===0){return e}const n=t.indexOf(this.indexSeparator);if(n>0){const r=t.substring(0,n);const i=parseInt(t.substring(n+1));const s=e[r];return s===null||s===void 0?void 0:s[i]}return e[t]}),e)}}class _p{constructor(e){this._ready=new Bh;this.settings={};this.workspaceConfig=false;this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t,n;this.workspaceConfig=(n=(t=e.capabilities.workspace)===null||t===void 0?void 0:t.configuration)!==null&&n!==void 0?n:false}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map((e=>this.toSectionName(e.LanguageMetaData.languageId)))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map((e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})));const n=await e.fetchConfiguration(t);t.forEach(((e,t)=>{this.updateSectionConfiguration(e.section,n[t])}))}}this._ready.resolve()}updateConfiguration(e){if(!e.settings){return}Object.keys(e.settings).forEach((t=>{this.updateSectionConfiguration(t,e.settings[t])}))}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const n=this.toSectionName(e);if(this.settings[n]){return this.settings[n][t]}}toSectionName(e){return`${e}`}}var Op;(function(e){function t(e){return{dispose:async()=>await e()}}e.create=t})(Op||(Op={}));class Pp{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}};this.updateListeners=[];this.buildPhaseListeners=new op;this.buildState=new Map;this.documentBuildWaiters=new Map;this.currentState=ep.Changed;this.langiumDocuments=e.workspace.LangiumDocuments;this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory;this.indexManager=e.workspace.IndexManager;this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=bh.CancellationToken.None){var r,i;for(const s of e){const e=s.uri.toString();if(s.state===ep.Validated){if(typeof t.validation==="boolean"&&t.validation){s.state=ep.IndexedReferences;s.diagnostics=undefined;this.buildState.delete(e)}else if(typeof t.validation==="object"){const n=this.buildState.get(e);const a=(r=n===null||n===void 0?void 0:n.result)===null||r===void 0?void 0:r.validationChecks;if(a){const r=(i=t.validation.categories)!==null&&i!==void 0?i:xp.all;const o=r.filter((e=>!a.includes(e)));if(o.length>0){this.buildState.set(e,{completed:false,options:{validation:Object.assign(Object.assign({},t.validation),{categories:o})},result:n.result});s.state=ep.IndexedReferences}}}}else{this.buildState.delete(e)}}this.currentState=ep.Changed;await this.emitUpdate(e.map((e=>e.uri)),[]);await this.buildDocuments(e,t,n)}async update(e,t,n=bh.CancellationToken.None){this.currentState=ep.Changed;for(const s of t){this.langiumDocuments.deleteDocument(s);this.buildState.delete(s.toString());this.indexManager.remove(s)}for(const s of e){const e=this.langiumDocuments.invalidateDocument(s);if(!e){const e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},s);e.state=ep.Changed;this.langiumDocuments.addDocument(e)}this.buildState.delete(s.toString())}const r=g(e).concat(t).map((e=>e.toString())).toSet();this.langiumDocuments.all.filter((e=>!r.has(e.uri.toString())&&this.shouldRelink(e,r))).forEach((e=>{const t=this.serviceRegistry.getServices(e.uri).references.Linker;t.unlink(e);e.state=Math.min(e.state,ep.ComputedScopes);e.diagnostics=undefined}));await this.emitUpdate(e,t);await Gh(n);const i=this.langiumDocuments.all.filter((e=>{var t;return e.state<ep.Linked||!((t=this.buildState.get(e.uri.toString()))===null||t===void 0?void 0:t.completed)})).toArray();await this.buildDocuments(i,this.updateBuildOptions,n)}async emitUpdate(e,t){await Promise.all(this.updateListeners.map((n=>n(e,t))))}shouldRelink(e,t){if(e.references.some((e=>e.error!==undefined))){return true}return this.indexManager.isAffected(e,t)}onUpdate(e){this.updateListeners.push(e);return Op.create((()=>{const t=this.updateListeners.indexOf(e);if(t>=0){this.updateListeners.splice(t,1)}}))}async buildDocuments(e,t,n){this.prepareBuild(e,t);await this.runCancelable(e,ep.Parsed,n,(e=>this.langiumDocumentFactory.update(e,n)));await this.runCancelable(e,ep.IndexedContent,n,(e=>this.indexManager.updateContent(e,n)));await this.runCancelable(e,ep.ComputedScopes,n,(async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.precomputedScopes=await t.computeLocalScopes(e,n)}));await this.runCancelable(e,ep.Linked,n,(e=>{const t=this.serviceRegistry.getServices(e.uri).references.Linker;return t.link(e,n)}));await this.runCancelable(e,ep.IndexedReferences,n,(e=>this.indexManager.updateReferences(e,n)));const r=e.filter((e=>this.shouldValidate(e)));await this.runCancelable(r,ep.Validated,n,(e=>this.validate(e,n)));for(const i of e){const e=this.buildState.get(i.uri.toString());if(e){e.completed=true}}}prepareBuild(e,t){for(const n of e){const e=n.uri.toString();const r=this.buildState.get(e);if(!r||r.completed){this.buildState.set(e,{completed:false,options:t,result:r===null||r===void 0?void 0:r.result})}}}async runCancelable(e,t,n,r){const i=e.filter((e=>e.state<t));for(const s of i){await Gh(n);await r(s);s.state=t}await this.notifyBuildPhase(i,t,n);this.currentState=t}onBuildPhase(e,t){this.buildPhaseListeners.add(e,t);return Op.create((()=>{this.buildPhaseListeners.delete(e,t)}))}waitUntil(e,t,n){let r=undefined;if(t&&"path"in t){r=t}else{n=t}n!==null&&n!==void 0?n:n=bh.CancellationToken.None;if(r){const t=this.langiumDocuments.getDocument(r);if(t&&t.state>e){return Promise.resolve(r)}}if(this.currentState>=e){return Promise.resolve(undefined)}else if(n.isCancellationRequested){return Promise.reject(Uh)}return new Promise(((t,i)=>{const s=this.onBuildPhase(e,(()=>{s.dispose();a.dispose();if(r){const e=this.langiumDocuments.getDocument(r);t(e===null||e===void 0?void 0:e.uri)}else{t(undefined)}}));const a=n.onCancellationRequested((()=>{s.dispose();a.dispose();i(Uh)}))}))}async notifyBuildPhase(e,t,n){if(e.length===0){return}const r=this.buildPhaseListeners.get(t);for(const i of r){await Gh(n);await i(e,n)}}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){var n,r;const i=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator;const s=this.getBuildOptions(e).validation;const a=typeof s==="object"?s:undefined;const o=await i.validateDocument(e,a,t);if(e.diagnostics){e.diagnostics.push(...o)}else{e.diagnostics=o}const c=this.buildState.get(e.uri.toString());if(c){(n=c.result)!==null&&n!==void 0?n:c.result={};const e=(r=a===null||a===void 0?void 0:a.categories)!==null&&r!==void 0?r:xp.all;if(c.result.validationChecks){c.result.validationChecks.push(...e)}else{c.result.validationChecks=[...e]}}}getBuildOptions(e){var t,n;return(n=(t=this.buildState.get(e.uri.toString()))===null||t===void 0?void 0:t.options)!==null&&n!==void 0?n:{}}}class Mp{constructor(e){this.symbolIndex=new Map;this.symbolByTypeIndex=new mp;this.referenceIndex=new Map;this.documents=e.workspace.LangiumDocuments;this.serviceRegistry=e.ServiceRegistry;this.astReflection=e.AstReflection}findAllReferences(e,t){const n=Ot(e).uri;const r=[];this.referenceIndex.forEach((e=>{e.forEach((e=>{if(Zh.equals(e.targetUri,n)&&e.targetPath===t){r.push(e)}}))}));return g(r)}allElements(e,t){let n=g(this.symbolIndex.keys());if(t){n=n.filter((e=>!t||t.has(e)))}return n.map((t=>this.getFileDescriptions(t,e))).flat()}getFileDescriptions(e,t){var n;if(!t){return(n=this.symbolIndex.get(e))!==null&&n!==void 0?n:[]}const r=this.symbolByTypeIndex.get(e,t,(()=>{var n;const r=(n=this.symbolIndex.get(e))!==null&&n!==void 0?n:[];return r.filter((e=>this.astReflection.isSubtype(e.type,t)))}));return r}remove(e){const t=e.toString();this.symbolIndex.delete(t);this.symbolByTypeIndex.clear(t);this.referenceIndex.delete(t)}async updateContent(e,t=bh.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri);const r=await n.references.ScopeComputation.computeExports(e,t);const i=e.uri.toString();this.symbolIndex.set(i,r);this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=bh.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri);const r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){const n=this.referenceIndex.get(e.uri.toString());if(!n){return false}return n.some((e=>!e.local&&t.has(e.targetUri.toString())))}}class Dp{constructor(e){this.initialBuildOptions={};this._ready=new Bh;this.serviceRegistry=e.ServiceRegistry;this.langiumDocuments=e.workspace.LangiumDocuments;this.documentBuilder=e.workspace.DocumentBuilder;this.fileSystemProvider=e.workspace.FileSystemProvider;this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var t;this.folders=(t=e.workspaceFolders)!==null&&t!==void 0?t:undefined}initialized(e){return this.mutex.write((e=>{var t;return this.initializeWorkspace((t=this.folders)!==null&&t!==void 0?t:[],e)}))}async initializeWorkspace(e,t=bh.CancellationToken.None){const n=await this.performStartup(e);await Gh(t);await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){const t=this.serviceRegistry.all.flatMap((e=>e.LanguageMetaData.fileExtensions));const n=[];const r=e=>{n.push(e);if(!this.langiumDocuments.hasDocument(e.uri)){this.langiumDocuments.addDocument(e)}};await this.loadAdditionalDocuments(e,r);await Promise.all(e.map((e=>[e,this.getRootFolder(e)])).map((async e=>this.traverseFolder(...e,t,r))));this._ready.resolve();return n}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Qh.parse(e.uri)}async traverseFolder(e,t,n,r){const i=await this.fileSystemProvider.readDirectory(t);await Promise.all(i.map((async t=>{if(this.includeEntry(e,t,n)){if(t.isDirectory){await this.traverseFolder(e,t.uri,n,r)}else if(t.isFile){const e=await this.langiumDocuments.getOrCreateDocument(t.uri);r(e)}}})))}includeEntry(e,t,n){const r=Zh.basename(t.uri);if(r.startsWith(".")){return false}if(t.isDirectory){return r!=="node_modules"&&r!=="out"}else if(t.isFile){const e=Zh.extname(t.uri);return n.includes(e)}return false}}class Up{constructor(e){const t=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const n=Bp(t)?Object.values(t):t;this.chevrotainLexer=new Ga(n,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var t;const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:(t=n.groups.hidden)!==null&&t!==void 0?t:[]}}toTokenTypeDictionary(e){if(Bp(e))return e;const t=Gp(e)?Object.values(e.modes).flat():e;const n={};t.forEach((e=>n[e.name]=e));return n}}function Fp(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}function Gp(e){return e&&"modes"in e&&"defaultMode"in e}function Bp(e){return!Fp(e)&&!Gp(e)}function Kp(e,t,n){let r;let i;if(typeof e==="string"){i=t;r=n}else{i=e.range.start;r=t}if(!i){i=Tf.create(0,0)}const s=Vp(e);const a=am(r);const o=zp({lines:s,position:i,options:a});return Zp({index:0,tokens:o,position:i})}function jp(e,t){const n=am(t);const r=Vp(e);if(r.length===0){return false}const i=r[0];const s=r[r.length-1];const a=n.start;const o=n.end;return Boolean(a===null||a===void 0?void 0:a.exec(i))&&Boolean(o===null||o===void 0?void 0:o.exec(s))}function Vp(e){let t="";if(typeof e==="string"){t=e}else{t=e.text}const n=t.split(an);return n}const Wp=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy;const Hp=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function zp(e){var t,n,r;const i=[];let s=e.position.line;let a=e.position.character;for(let o=0;o<e.lines.length;o++){const c=o===0;const u=o===e.lines.length-1;let l=e.lines[o];let f=0;if(c&&e.options.start){const n=(t=e.options.start)===null||t===void 0?void 0:t.exec(l);if(n){f=n.index+n[0].length}}else{const t=(n=e.options.line)===null||n===void 0?void 0:n.exec(l);if(t){f=t.index+t[0].length}}if(u){const t=(r=e.options.end)===null||r===void 0?void 0:r.exec(l);if(t){l=l.substring(0,t.index)}}l=l.substring(0,Jp(l));const d=Qp(l,f);if(d>=l.length){if(i.length>0){const e=Tf.create(s,a);i.push({type:"break",content:"",range:vf.create(e,e)})}}else{Wp.lastIndex=f;const e=Wp.exec(l);if(e){const t=e[0];const n=e[1];const r=Tf.create(s,a+f);const o=Tf.create(s,a+f+t.length);i.push({type:"tag",content:n,range:vf.create(r,o)});f+=t.length;f=Qp(l,f)}if(f<l.length){const e=l.substring(f);const t=Array.from(e.matchAll(Hp));i.push(...qp(t,e,s,a+f))}}s++;a=0}if(i.length>0&&i[i.length-1].type==="break"){return i.slice(0,-1)}return i}function qp(e,t,n,r){const i=[];if(e.length===0){const e=Tf.create(n,r);const s=Tf.create(n,r+t.length);i.push({type:"text",content:t,range:vf.create(e,s)})}else{let s=0;for(const o of e){const e=o.index;const a=t.substring(s,e);if(a.length>0){i.push({type:"text",content:t.substring(s,e),range:vf.create(Tf.create(n,s+r),Tf.create(n,e+r))})}let c=a.length+1;const u=o[1];i.push({type:"inline-tag",content:u,range:vf.create(Tf.create(n,s+c+r),Tf.create(n,s+c+u.length+r))});c+=u.length;if(o.length===4){c+=o[2].length;const e=o[3];i.push({type:"text",content:e,range:vf.create(Tf.create(n,s+c+r),Tf.create(n,s+c+e.length+r))})}else{i.push({type:"text",content:"",range:vf.create(Tf.create(n,s+c+r),Tf.create(n,s+c+r))})}s=e+o[0].length}const a=t.substring(s);if(a.length>0){i.push({type:"text",content:a,range:vf.create(Tf.create(n,s+r),Tf.create(n,s+r+a.length))})}}return i}const Yp=/\S/;const Xp=/\s*$/;function Qp(e,t){const n=e.substring(t).match(Yp);if(n){return t+n.index}else{return e.length}}function Jp(e){const t=e.match(Xp);if(t&&typeof t.index==="number"){return t.index}return undefined}function Zp(e){var t,n,r,i;const s=Tf.create(e.position.line,e.position.character);if(e.tokens.length===0){return new cm([],vf.create(s,s))}const a=[];while(e.index<e.tokens.length){const t=em(e,a[a.length-1]);if(t){a.push(t)}}const o=(n=(t=a[0])===null||t===void 0?void 0:t.range.start)!==null&&n!==void 0?n:s;const c=(i=(r=a[a.length-1])===null||r===void 0?void 0:r.range.end)!==null&&i!==void 0?i:s;return new cm(a,vf.create(o,c))}function em(e,t){const n=e.tokens[e.index];if(n.type==="tag"){return im(e,false)}else if(n.type==="text"||n.type==="inline-tag"){return nm(e)}else{tm(n,t);e.index++;return undefined}}function tm(e,t){if(t){const n=new hm("",e.range);if("inlines"in t){t.inlines.push(n)}else{t.content.inlines.push(n)}}}function nm(e){let t=e.tokens[e.index];const n=t;let r=t;const i=[];while(t&&t.type!=="break"&&t.type!=="tag"){i.push(rm(e));r=t;t=e.tokens[e.index]}return new dm(i,vf.create(n.range.start,r.range.end))}function rm(e){const t=e.tokens[e.index];if(t.type==="inline-tag"){return im(e,true)}else{return sm(e)}}function im(e,t){const n=e.tokens[e.index++];const r=n.content.substring(1);const i=e.tokens[e.index];if((i===null||i===void 0?void 0:i.type)==="text"){if(t){const i=sm(e);return new um(r,new dm([i],i.range),t,vf.create(n.range.start,i.range.end))}else{const i=nm(e);return new um(r,i,t,vf.create(n.range.start,i.range.end))}}else{const e=n.range;return new um(r,new dm([],e),t,e)}}function sm(e){const t=e.tokens[e.index++];return new hm(t.content,t.range)}function am(e){if(!e){return am({start:"/**",end:"*/",line:"*"})}const{start:t,end:n,line:r}=e;return{start:om(t,true),end:om(n,false),line:om(r,true)}}function om(e,t){if(typeof e==="string"||typeof e==="object"){const n=typeof e==="string"?hn(e):e.source;if(t){return new RegExp(`^\\s*${n}`)}else{return new RegExp(`\\s*${n}\\s*$`)}}else{return e}}class cm{constructor(e,t){this.elements=e;this.range=t}getTag(e){return this.getAllTags().find((t=>t.name===e))}getTags(e){return this.getAllTags().filter((t=>t.name===e))}getAllTags(){return this.elements.filter((e=>"name"in e))}toString(){let e="";for(const t of this.elements){if(e.length===0){e=t.toString()}else{const n=t.toString();e+=pm(e)+n}}return e.trim()}toMarkdown(e){let t="";for(const n of this.elements){if(t.length===0){t=n.toMarkdown(e)}else{const r=n.toMarkdown(e);t+=pm(t)+r}}return t.trim()}}class um{constructor(e,t,n,r){this.name=e;this.content=t;this.inline=n;this.range=r}toString(){let e=`@${this.name}`;const t=this.content.toString();if(this.content.inlines.length===1){e=`${e} ${t}`}else if(this.content.inlines.length>1){e=`${e}\n${t}`}if(this.inline){return`{${e}}`}else{return e}}toMarkdown(e){var t,n;return(n=(t=e===null||e===void 0?void 0:e.renderTag)===null||t===void 0?void 0:t.call(e,this))!==null&&n!==void 0?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const n=lm(this.name,t,e!==null&&e!==void 0?e:{});if(typeof n==="string"){return n}}let n="";if((e===null||e===void 0?void 0:e.tag)==="italic"||(e===null||e===void 0?void 0:e.tag)===undefined){n="*"}else if((e===null||e===void 0?void 0:e.tag)==="bold"){n="**"}else if((e===null||e===void 0?void 0:e.tag)==="bold-italic"){n="***"}let r=`${n}@${this.name}${n}`;if(this.content.inlines.length===1){r=`${r} — ${t}`}else if(this.content.inlines.length>1){r=`${r}\n${t}`}if(this.inline){return`{${r}}`}else{return r}}}function lm(e,t,n){var r,i;if(e==="linkplain"||e==="linkcode"||e==="link"){const s=t.indexOf(" ");let a=t;if(s>0){const e=Qp(t,s);a=t.substring(e);t=t.substring(0,s)}if(e==="linkcode"||e==="link"&&n.link==="code"){a=`\`${a}\``}const o=(i=(r=n.renderLink)===null||r===void 0?void 0:r.call(n,t,a))!==null&&i!==void 0?i:fm(t,a);return o}return undefined}function fm(e,t){try{Qh.parse(e,true);return`[${t}](${e})`}catch(n){return e}}class dm{constructor(e,t){this.inlines=e;this.range=t}toString(){let e="";for(let t=0;t<this.inlines.length;t++){const n=this.inlines[t];const r=this.inlines[t+1];e+=n.toString();if(r&&r.range.start.line>n.range.start.line){e+="\n"}}return e}toMarkdown(e){let t="";for(let n=0;n<this.inlines.length;n++){const r=this.inlines[n];const i=this.inlines[n+1];t+=r.toMarkdown(e);if(i&&i.range.start.line>r.range.start.line){t+="\n"}}return t}}class hm{constructor(e,t){this.text=e;this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function pm(e){if(e.endsWith("\n")){return"\n"}else{return"\n\n"}}class mm{constructor(e){this.indexManager=e.shared.workspace.IndexManager;this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&jp(t)){const n=Kp(t);return n.toMarkdown({renderLink:(t,n)=>this.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}return undefined}documentationLinkRenderer(e,t,n){var r;const i=(r=this.findNameInPrecomputedScopes(e,t))!==null&&r!==void 0?r:this.findNameInGlobalScope(e,t);if(i&&i.nameSegment){const e=i.nameSegment.range.start.line+1;const t=i.nameSegment.range.start.character+1;const r=i.documentUri.with({fragment:`L${e},${t}`});return`[${n}](${r.toString()})`}else{return undefined}}documentationTagRenderer(e,t){return undefined}findNameInPrecomputedScopes(e,t){const n=Ot(e);const r=n.precomputedScopes;if(!r){return undefined}let i=e;do{const e=r.get(i);const n=e.find((e=>e.name===t));if(n){return n}i=i.$container}while(i);return undefined}findNameInGlobalScope(e,t){const n=this.indexManager.allElements().find((e=>e.name===t));return n}}class gm{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;if(Tp(e)){return e.$comment}return(t=C(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||t===void 0?void 0:t.text}}var ym=n(62676);class Am{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}}class Tm{constructor(e){this.threadCount=8;this.terminationDelay=200;this.workerPool=[];this.queue=[];this.hydrator=e.serializer.Hydrator}initializeWorkers(){while(this.workerPool.length<this.threadCount){const e=this.createWorker();e.onReady((()=>{if(this.queue.length>0){const t=this.queue.shift();if(t){e.lock();t.resolve(e)}}}));this.workerPool.push(e)}}async parse(e,t){const n=await this.acquireParserWorker(t);const r=new Deferred;let i;const s=t.onCancellationRequested((()=>{i=setTimeout((()=>{this.terminateWorker(n)}),this.terminationDelay)}));n.parse(e).then((e=>{const t=this.hydrator.hydrate(e);r.resolve(t)})).catch((e=>{r.reject(e)})).finally((()=>{s.dispose();clearTimeout(i)}));return r.promise}terminateWorker(e){e.terminate();const t=this.workerPool.indexOf(e);if(t>=0){this.workerPool.splice(t,1)}}async acquireParserWorker(e){this.initializeWorkers();for(const n of this.workerPool){if(n.ready){n.lock();return n}}const t=new Deferred;e.onCancellationRequested((()=>{const e=this.queue.indexOf(t);if(e>=0){this.queue.splice(e,1)}t.reject(OperationCancelled)}));this.queue.push(t);return t.promise}}class vm{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,n,r){this.onReadyEmitter=new Emitter;this.deferred=new Deferred;this._ready=true;this._parsing=false;this.sendMessage=e;this._terminate=r;t((e=>{const t=e;this.deferred.resolve(t);this.unlock()}));n((e=>{this.deferred.reject(e);this.unlock()}))}terminate(){this.deferred.reject(OperationCancelled);this._terminate()}lock(){this._ready=false}unlock(){this._parsing=false;this._ready=true;this.onReadyEmitter.fire()}parse(e){if(this._parsing){throw new Error("Parser worker is busy")}this._parsing=true;this.deferred=new Deferred;this.sendMessage(e);return this.deferred.promise}}class Em{constructor(){this.previousTokenSource=new bh.CancellationTokenSource;this.writeQueue=[];this.readQueue=[];this.done=true}write(e){this.cancelWrite();const t=new bh.CancellationTokenSource;this.previousTokenSource=t;return this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n){const r=new Bh;const i={action:t,deferred:r,cancellationToken:n!==null&&n!==void 0?n:bh.CancellationToken.None};e.push(i);this.performNextOperation();return r.promise}async performNextOperation(){if(!this.done){return}const e=[];if(this.writeQueue.length>0){e.push(this.writeQueue.shift())}else if(this.readQueue.length>0){e.push(...this.readQueue.splice(0,this.readQueue.length))}else{return}this.done=false;await Promise.all(e.map((async({action:e,deferred:t,cancellationToken:n})=>{try{const r=await Promise.resolve().then((()=>e(n)));t.resolve(r)}catch(r){if(Fh(r)){t.resolve(undefined)}else{t.reject(r)}}})));this.done=true;this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Rm{constructor(e){this.grammarElementIdMap=new cp;this.tokenTypeIdMap=new cp;this.grammar=e.Grammar;this.lexer=e.parser.Lexer;this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map((e=>Object.assign({},e))),parserErrors:e.parserErrors.map((e=>Object.assign({},e))),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){const t=new Map;const n=new Map;for(const r of Ut(e)){t.set(r,{})}if(e.$cstNode){for(const t of T(e.$cstNode)){n.set(t,{})}}return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type;n.$containerIndex=e.$containerIndex;n.$containerProperty=e.$containerProperty;if(e.$cstNode!==undefined){n.$cstNode=this.dehydrateCstNode(e.$cstNode,t)}for(const[s,a]of Object.entries(e)){if(s.startsWith("$")){continue}if(Array.isArray(a)){const e=[];n[s]=e;for(const n of a){if(r(n)){e.push(this.dehydrateAstNode(n,t))}else if(i(n)){e.push(this.dehydrateReference(n,t))}else{e.push(n)}}}else if(r(a)){n[s]=this.dehydrateAstNode(a,t)}else if(i(a)){n[s]=this.dehydrateReference(a,t)}else if(a!==undefined){n[s]=a}}return n}dehydrateReference(e,t){const n={};n.$refText=e.$refText;if(e.$refNode){n.$refNode=t.cstNodes.get(e.$refNode)}return n}dehydrateCstNode(e,t){const n=t.cstNodes.get(e);if(l(e)){n.fullText=e.fullText}else{n.grammarSource=this.getGrammarElementId(e.grammarSource)}n.hidden=e.hidden;n.astNode=t.astNodes.get(e.astNode);if(c(e)){n.content=e.content.map((e=>this.dehydrateCstNode(e,t)))}else if(u(e)){n.tokenType=e.tokenType.name;n.offset=e.offset;n.length=e.length;n.startLine=e.range.start.line;n.startColumn=e.range.start.character;n.endLine=e.range.end.line;n.endColumn=e.range.end.character}return n}hydrate(e){const t=e.value;const n=this.createHydrationContext(t);if("$cstNode"in t){this.hydrateCstNode(t.$cstNode,n)}return{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){const t=new Map;const n=new Map;for(const i of Ut(e)){t.set(i,{})}let r;if(e.$cstNode){for(const t of T(e.$cstNode)){let e;if("fullText"in t){e=new Qd(t.fullText);r=e}else if("content"in t){e=new Yd}else if("tokenType"in t){e=this.hydrateCstLeafNode(t)}if(e){n.set(t,e);e.root=r}}}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type;n.$containerIndex=e.$containerIndex;n.$containerProperty=e.$containerProperty;if(e.$cstNode){n.$cstNode=t.cstNodes.get(e.$cstNode)}for(const[s,a]of Object.entries(e)){if(s.startsWith("$")){continue}if(Array.isArray(a)){const e=[];n[s]=e;for(const o of a){if(r(o)){e.push(this.setParent(this.hydrateAstNode(o,t),n))}else if(i(o)){e.push(this.hydrateReference(o,n,s,t))}else{e.push(o)}}}else if(r(a)){n[s]=this.setParent(this.hydrateAstNode(a,t),n)}else if(i(a)){n[s]=this.hydrateReference(a,n,s,t)}else if(a!==undefined){n[s]=a}}return n}setParent(e,t){e.$container=t;return e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){const r=t.cstNodes.get(e);if(typeof e.grammarSource==="number"){r.grammarSource=this.getGrammarElement(e.grammarSource)}r.astNode=t.astNodes.get(e.astNode);if(c(r)){for(const i of e.content){const e=this.hydrateCstNode(i,t,n++);r.content.push(e)}}return r}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType);const n=e.offset;const r=e.length;const i=e.startLine;const s=e.startColumn;const a=e.endLine;const o=e.endColumn;const c=e.hidden;const u=new qd(n,r,{start:{line:i,character:s},end:{line:a,character:o}},t,c);return u}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(this.grammarElementIdMap.size===0){this.createGrammarElementIdMap()}return this.grammarElementIdMap.get(e)}getGrammarElement(e){if(this.grammarElementIdMap.size===0){this.createGrammarElementIdMap()}const t=this.grammarElementIdMap.getKey(e);if(t){return t}else{throw new Error("Invalid grammar element id: "+e)}}createGrammarElementIdMap(){let e=0;for(const t of Ut(this.grammar)){if(ne(t)){this.grammarElementIdMap.set(t,e++)}}}}function km(e){return{documentation:{CommentProvider:e=>new gm(e),DocumentationProvider:e=>new mm(e)},parser:{AsyncParser:e=>new Am(e),GrammarConfig:e=>er(e),LangiumParser:e=>wh(e),CompletionParser:e=>Sh(e),ValueConverter:()=>new $h,TokenBuilder:()=>new Ch,Lexer:e=>new Up(e),ParserErrorMessageProvider:()=>new sh},workspace:{AstNodeLocator:()=>new bp,AstNodeDescriptionProvider:e=>new $p(e),ReferenceDescriptionProvider:e=>new Lp(e)},references:{Linker:e=>new rp(e),NameProvider:()=>new sp,ScopeProvider:e=>new Ap(e),ScopeComputation:e=>new up(e),References:e=>new ap(e)},serializer:{Hydrator:e=>new Rm(e),JsonSerializer:e=>new Ep(e)},validation:{DocumentValidator:e=>new Sp(e),ValidationRegistry:e=>new Ip(e)},shared:()=>e.shared}}function xm(e){return{ServiceRegistry:()=>new Rp,workspace:{LangiumDocuments:e=>new np(e),LangiumDocumentFactory:e=>new tp(e),DocumentBuilder:e=>new Pp(e),IndexManager:e=>new Mp(e),WorkspaceManager:e=>new Dp(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new Em,ConfigurationProvider:e=>new _p(e)}}}var Im;(function(e){e.merge=(e,t)=>bm(bm({},e),t)})(Im||(Im={}));function Sm(e,t,n,r,i,s,a,o,c){const u=[e,t,n,r,i,s,a,o,c].reduce(bm,{});return Cm(u)}const wm=Symbol("isProxy");function Nm(e){if(e&&e[wm]){for(const t of Object.values(e)){Nm(t)}}return e}function Cm(e,t){const n=new Proxy({},{deleteProperty:()=>false,get:(r,i)=>Lm(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(Lm(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Reflect.ownKeys(e),wm]});n[wm]=true;return n}const $m=Symbol();function Lm(e,t,n,r){if(t in e){if(e[t]instanceof Error){throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:e[t]})}if(e[t]===$m){throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies')}return e[t]}else if(t in n){const s=n[t];e[t]=$m;try{e[t]=typeof s==="function"?s(r):Cm(s,r)}catch(i){e[t]=i instanceof Error?i:undefined;throw i}return e[t]}else{return undefined}}function bm(e,t){if(t){for(const[n,r]of Object.entries(t)){if(r!==undefined){const t=e[n];if(t!==null&&r!==null&&typeof t==="object"&&typeof r==="object"){e[n]=bm(t,r)}else{e[n]=r}}}}return e}class _m{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}}const Om={fileSystemProvider:()=>new _m};const Pm={Grammar:()=>undefined,LanguageMetaData:()=>({caseInsensitive:false,fileExtensions:[".langium"],languageId:"langium"})};const Mm={AstReflection:()=>new Ct};function Dm(){const e=Sm(xm(Om),Mm);const t=Sm(km({shared:e}),Pm);e.ServiceRegistry.register(t);return t}function Um(e){var t;const n=Dm();const r=n.serializer.JsonSerializer.deserialize(e);n.shared.workspace.LangiumDocumentFactory.fromModel(r,Qh.parse(`memory://${(t=r.name)!==null&&t!==void 0?t:"grammar"}.langium`));return r}},95852:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(62579);function i(e,t,n){var i=-1,s=e.length;while(++i<s){var a=e[i],o=t(a);if(o!=null&&(c===undefined?o===o&&!(0,r.A)(o):n(o,c))){var c=o,u=a}}return u}const s=i},51135:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});function r(e,t){return e<t}const i=r},97457:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(15912);var i=n(21585);function s(e,t){var n=-1,s=(0,i.A)(e)?Array(e.length):[];(0,r.A)(e,(function(e,r,i){s[++n]=t(e,r,i)}));return s}const a=s},44835:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(22883);var i=n(16542);var s=n(65900);var a=n(78912);var o=n(85356);var c=n(43512);function u(e,t,n,r){if(!(0,o.A)(e)){return e}t=(0,s.A)(t,e);var u=-1,l=t.length,f=l-1,d=e;while(d!=null&&++u<l){var h=(0,c.A)(t[u]),p=n;if(h==="__proto__"||h==="constructor"||h==="prototype"){return e}if(u!=f){var m=d[h];p=r?r(m,h,d):undefined;if(p===undefined){p=(0,o.A)(m)?m:(0,a.A)(t[u+1])?[]:{}}}(0,i.A)(d,h,p);d=d[h]}return e}const l=u;function f(e,t,n){var i=-1,a=t.length,o={};while(++i<a){var c=t[i],u=(0,r.A)(e,c);if(n(u,c)){l(o,(0,s.A)(c,e),u)}}return o}const d=f},97134:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(59386);var i=4;function s(e){return(0,r.A)(e,i)}const a=s},38693:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(55881);var i=n(24461);var s=n(31943);var a=n(13839);var o=Object.prototype;var c=o.hasOwnProperty;var u=(0,r.A)((function(e,t){e=Object(e);var n=-1;var r=t.length;var u=r>2?t[2]:undefined;if(u&&(0,s.A)(t[0],t[1],u)){r=1}while(++n<r){var l=t[n];var f=(0,a.A)(l);var d=-1;var h=f.length;while(++d<h){var p=f[d];var m=e[p];if(m===undefined||(0,i.A)(m,o[p])&&!c.call(e,p)){e[p]=l[p]}}}return e}));const l=u},85075:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(1121);var i=n(21585);var s=n(37947);function a(e){return function(t,n,a){var o=Object(t);if(!(0,i.A)(t)){var c=(0,r.A)(n,3);t=(0,s.A)(t);n=function(e){return c(o[e],e,o)}}var u=e(t,n,a);return u>-1?o[c?t[u]:u]:undefined}}const o=a;var c=n(97314);var u=n(29914);var l=Math.max;function f(e,t,n){var i=e==null?0:e.length;if(!i){return-1}var s=n==null?0:(0,u.A)(n);if(s<0){s=l(i+s,0)}return(0,c.A)(e,(0,r.A)(t,3),s)}const d=f;var h=o(d);const p=h},74033:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(62040);function i(e){var t=e==null?0:e.length;return t?(0,r.A)(e,1):[]}const s=i},2850:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=Object.prototype;var i=r.hasOwnProperty;function s(e,t){return e!=null&&i.call(e,t)}const a=s;var o=n(64491);function c(e,t){return e!=null&&(0,o.A)(e,t,a)}const u=c},86378:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(64128);var i=n(39990);var s=n(53315);var a="[object String]";function o(e){return typeof e=="string"||!(0,i.A)(e)&&(0,s.A)(e)&&(0,r.A)(e)==a}const c=o},80359:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});function r(e){var t=e==null?0:e.length;return t?e[t-1]:undefined}const i=r},8937:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(98519);var i=n(1121);var s=n(97457);var a=n(39990);function o(e,t){var n=(0,a.A)(e)?r.A:s.A;return n(e,(0,i.A)(t,3))}const c=o},963:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(95852);var i=n(51135);var s=n(63077);function a(e){return e&&e.length?(0,r.A)(e,s.A,i.A):undefined}const o=a},52712:(e,t,n)=>{"use strict";n.d(t,{A:()=>E});var r=/\s/;function i(e){var t=e.length;while(t--&&r.test(e.charAt(t))){}return t}const s=i;var a=/^\s+/;function o(e){return e?e.slice(0,s(e)+1).replace(a,""):e}const c=o;var u=n(85356);var l=n(62579);var f=0/0;var d=/^[-+]0x[0-9a-f]+$/i;var h=/^0b[01]+$/i;var p=/^0o[0-7]+$/i;var m=parseInt;function g(e){if(typeof e=="number"){return e}if((0,l.A)(e)){return f}if((0,u.A)(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=(0,u.A)(t)?t+"":t}if(typeof e!="string"){return e===0?e:+e}e=c(e);var n=h.test(e);return n||p.test(e)?m(e.slice(2),n?2:8):d.test(e)?f:+e}const y=g;var A=1/0,T=17976931348623157e292;function v(e){if(!e){return e===0?e:0}e=y(e);if(e===A||e===-A){var t=e<0?-1:1;return t*T}return e===e?e:0}const E=v},29914:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(52712);function i(e){var t=(0,r.A)(e),n=t%1;return t===t?n?t-n:t:0}const s=i},65606:e=>{var t=e.exports={};var n;var r;function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){n=setTimeout}else{n=i}}catch(e){n=i}try{if(typeof clearTimeout==="function"){r=clearTimeout}else{r=s}}catch(e){r=s}})();function a(e){if(n===setTimeout){return setTimeout(e,0)}if((n===i||!n)&&setTimeout){n=setTimeout;return setTimeout(e,0)}try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}function o(e){if(r===clearTimeout){return clearTimeout(e)}if((r===s||!r)&&clearTimeout){r=clearTimeout;return clearTimeout(e)}try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}var c=[];var u=false;var l;var f=-1;function d(){if(!u||!l){return}u=false;if(l.length){c=l.concat(c)}else{f=-1}if(c.length){h()}}function h(){if(u){return}var e=a(d);u=true;var t=c.length;while(t){l=c;c=[];while(++f<t){if(l){l[f].run()}}f=-1;t=c.length}l=null;u=false;o(e)}t.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1){for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}}c.push(new p(e,t));if(c.length===1&&!u){a(h)}};function p(e,t){this.fun=e;this.array=t}p.prototype.run=function(){this.fun.apply(null,this.array)};t.title="browser";t.browser=true;t.env={};t.argv=[];t.version="";t.versions={};function m(){}t.on=m;t.addListener=m;t.once=m;t.off=m;t.removeListener=m;t.removeAllListeners=m;t.emit=m;t.prependListener=m;t.prependOnceListener=m;t.listeners=function(e){return[]};t.binding=function(e){throw new Error("process.binding is not supported")};t.cwd=function(){return"/"};t.chdir=function(e){throw new Error("process.chdir is not supported")};t.umask=function(){return 0}},59850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(69590);const i=n(78585);const s=n(62676);var a;(function(e){e.None=Object.freeze({isCancellationRequested:false,onCancellationRequested:s.Event.None});e.Cancelled=Object.freeze({isCancellationRequested:true,onCancellationRequested:s.Event.None});function t(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}e.is=t})(a||(t.CancellationToken=a={}));const o=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{constructor(){this._isCancelled=false}cancel(){if(!this._isCancelled){this._isCancelled=true;if(this._emitter){this._emitter.fire(undefined);this.dispose()}}}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){if(this._isCancelled){return o}if(!this._emitter){this._emitter=new s.Emitter}return this._emitter.event}dispose(){if(this._emitter){this._emitter.dispose();this._emitter=undefined}}}class u{get token(){if(!this._token){this._token=new c}return this._token}cancel(){if(!this._token){this._token=a.Cancelled}else{this._token.cancel()}}dispose(){if(!this._token){this._token=a.None}else if(this._token instanceof c){this._token.dispose()}}}t.CancellationTokenSource=u},62676:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Emitter=t.Event=void 0;const r=n(69590);var i;(function(e){const t={dispose(){}};e.None=function(){return t}})(i||(t.Event=i={}));class s{add(e,t=null,n){if(!this._callbacks){this._callbacks=[];this._contexts=[]}this._callbacks.push(e);this._contexts.push(t);if(Array.isArray(n)){n.push({dispose:()=>this.remove(e,t)})}}remove(e,t=null){if(!this._callbacks){return}let n=false;for(let r=0,i=this._callbacks.length;r<i;r++){if(this._callbacks[r]===e){if(this._contexts[r]===t){this._callbacks.splice(r,1);this._contexts.splice(r,1);return}else{n=true}}}if(n){throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...e){if(!this._callbacks){return[]}const t=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let a=0,o=n.length;a<o;a++){try{t.push(n[a].apply(i[a],e))}catch(s){(0,r.default)().console.error(s)}}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=undefined;this._contexts=undefined}}class a{constructor(e){this._options=e}get event(){if(!this._event){this._event=(e,t,n)=>{if(!this._callbacks){this._callbacks=new s}if(this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()){this._options.onFirstListenerAdd(this)}this._callbacks.add(e,t);const r={dispose:()=>{if(!this._callbacks){return}this._callbacks.remove(e,t);r.dispose=a._noop;if(this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()){this._options.onLastListenerRemove(this)}}};if(Array.isArray(n)){n.push(r)}return r}}return this._event}fire(e){if(this._callbacks){this._callbacks.invoke.call(this._callbacks,e)}}dispose(){if(this._callbacks){this._callbacks.dispose();this._callbacks=undefined}}}t.Emitter=a;a._noop=function(){}},78585:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function n(e){return e===true||e===false}t.boolean=n;function r(e){return typeof e==="string"||e instanceof String}t.string=r;function i(e){return typeof e==="number"||e instanceof Number}t.number=i;function s(e){return e instanceof Error}t.error=s;function a(e){return typeof e==="function"}t.func=a;function o(e){return Array.isArray(e)}t.array=o;function c(e){return o(e)&&e.every((e=>r(e)))}t.stringArray=c},69590:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});let n;function r(){if(n===undefined){throw new Error(`No runtime abstraction layer installed`)}return n}(function(e){function t(e){if(e===undefined){throw new Error(`No runtime abstraction layer provided`)}n=e}e.install=t})(r||(r={}));t["default"]=r}}]);
|
1
|
+
(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[4010,5606],{34496:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});var r=n(75472);var i=n(34050);var s=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}};var a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr);const n=(0,i.WQ)((0,i.tG)({shared:t}),r.e5,a);t.ServiceRegistry.register(n);return{shared:t,Info:n}}(0,r.K2)(o,"createInfoServices")},95304:(e,t,n)=>{"use strict";n.d(t,{f:()=>c});var r=n(75472);var i=n(34050);var s=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}};var a=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(e,t,n){if(e.name!=="PIE_SECTION_LABEL"){return void 0}return t.replace(/"/g,"").trim()}};var o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new a),"ValueConverter")}};function c(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr);const n=(0,i.WQ)((0,i.tG)({shared:t}),r.KX,o);t.ServiceRegistry.register(n);return{shared:t,Pie:n}}(0,r.K2)(c,"createPieServices")},7112:(e,t,n)=>{"use strict";n.d(t,{$:()=>o});var r=n(75472);var i=n(34050);var s=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}};var a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr);const n=(0,i.WQ)((0,i.tG)({shared:t}),r.AM,a);t.ServiceRegistry.register(n);return{shared:t,Packet:n}}(0,r.K2)(o,"createPacketServices")},75753:(e,t,n)=>{"use strict";n.d(t,{S:()=>c});var r=n(75472);var i=n(34050);var s=class extends r.mR{static{(0,r.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}};var a=class extends r.dg{static{(0,r.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,n){if(e.name==="ARCH_ICON"){return t.replace(/[()]/g,"").trim()}else if(e.name==="ARCH_TEXT_ICON"){return t.replace(/["()]/g,"")}else if(e.name==="ARCH_TITLE"){return t.replace(/[[\]]/g,"").trim()}return void 0}};var o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new a),"ValueConverter")}};function c(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr);const n=(0,i.WQ)((0,i.tG)({shared:t}),r.jE,o);t.ServiceRegistry.register(n);return{shared:t,Architecture:n}}(0,r.K2)(c,"createArchitectureServices")},98996:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var r=n(75472);var i=n(34050);var s=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}};var a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr);const n=(0,i.WQ)((0,i.tG)({shared:t}),r.eZ,a);t.ServiceRegistry.register(n);return{shared:t,GitGraph:n}}(0,r.K2)(o,"createGitGraphServices")},75472:(e,t,n)=>{"use strict";n.d(t,{AM:()=>Q,K2:()=>s,KX:()=>J,Tm:()=>ae,dg:()=>se,e5:()=>X,eZ:()=>ee,jE:()=>Z,mR:()=>oe,sr:()=>Y});var r=n(34050);var i=Object.defineProperty;var s=(e,t)=>i(e,"name",{value:t,configurable:true});var a="Statement";var o="Architecture";function c(e){return _.isInstance(e,o)}s(c,"isArchitecture");var u="Branch";function l(e){return _.isInstance(e,u)}s(l,"isBranch");var f="Checkout";var d="CherryPicking";var h="Commit";function p(e){return _.isInstance(e,h)}s(p,"isCommit");var m="Common";function g(e){return _.isInstance(e,m)}s(g,"isCommon");var y="GitGraph";function A(e){return _.isInstance(e,y)}s(A,"isGitGraph");var T="Info";function v(e){return _.isInstance(e,T)}s(v,"isInfo");var E="Merge";function R(e){return _.isInstance(e,E)}s(R,"isMerge");var k="Packet";function x(e){return _.isInstance(e,k)}s(x,"isPacket");var I="PacketBlock";function S(e){return _.isInstance(e,I)}s(S,"isPacketBlock");var w="Pie";function N(e){return _.isInstance(e,w)}s(N,"isPie");var C="PieSection";function $(e){return _.isInstance(e,C)}s($,"isPieSection");var L="Direction";var b=class extends r.kD{static{s(this,"MermaidAstReflection")}getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(e,t){switch(e){case u:case f:case d:case h:case E:{return this.isSubtype(a,t)}case L:{return this.isSubtype(y,t)}default:{return false}}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){default:{throw new Error(`${t} is not a valid reference id.`)}}}getTypeMetaData(e){switch(e){case"Architecture":{return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]}}case"Branch":{return{name:"Branch",properties:[{name:"name"},{name:"order"}]}}case"Checkout":{return{name:"Checkout",properties:[{name:"branch"}]}}case"CherryPicking":{return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]}}case"Commit":{return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]}}case"Common":{return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]}}case"Edge":{return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:false},{name:"lhsId"},{name:"lhsInto",defaultValue:false},{name:"rhsDir"},{name:"rhsGroup",defaultValue:false},{name:"rhsId"},{name:"rhsInto",defaultValue:false},{name:"title"}]}}case"GitGraph":{return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]}}case"Group":{return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]}}case"Info":{return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]}}case"Junction":{return{name:"Junction",properties:[{name:"id"},{name:"in"}]}}case"Merge":{return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]}}case"Packet":{return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]}}case"PacketBlock":{return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]}}case"Pie":{return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:false},{name:"title"}]}}case"PieSection":{return{name:"PieSection",properties:[{name:"label"},{name:"value"}]}}case"Service":{return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]}}case"Direction":{return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]}}default:{return{name:e,properties:[]}}}}};var _=new b;var O;var P=s((()=>O??(O=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"InfoGrammar");var M;var D=s((()=>M??(M=(0,r.y0)(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`))),"PacketGrammar");var U;var F=s((()=>U??(U=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PieGrammar");var G;var B=s((()=>G??(G=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"ArchitectureGrammar");var K;var j=s((()=>K??(K=(0,r.y0)(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`))),"GitGraphGrammar");var V={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false};var W={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false};var H={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false};var z={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false};var q={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false};var Y={AstReflection:s((()=>new b),"AstReflection")};var X={Grammar:s((()=>P()),"Grammar"),LanguageMetaData:s((()=>V),"LanguageMetaData"),parser:{}};var Q={Grammar:s((()=>D()),"Grammar"),LanguageMetaData:s((()=>W),"LanguageMetaData"),parser:{}};var J={Grammar:s((()=>F()),"Grammar"),LanguageMetaData:s((()=>H),"LanguageMetaData"),parser:{}};var Z={Grammar:s((()=>B()),"Grammar"),LanguageMetaData:s((()=>z),"LanguageMetaData"),parser:{}};var ee={Grammar:s((()=>j()),"Grammar"),LanguageMetaData:s((()=>q),"LanguageMetaData"),parser:{}};var te=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/;var ne=/accTitle[\t ]*:([^\n\r]*)/;var re=/title([\t ][^\n\r]*|)/;var ie={ACC_DESCR:te,ACC_TITLE:ne,TITLE:re};var se=class extends r.dM{static{s(this,"AbstractMermaidValueConverter")}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);if(r===void 0){r=this.runCustomConverter(e,t,n)}if(r===void 0){return super.runConverter(e,t,n)}return r}runCommonConverter(e,t,n){const r=ie[e.name];if(r===void 0){return void 0}const i=r.exec(t);if(i===null){return void 0}if(i[1]!==void 0){return i[1].trim().replace(/[\t ]{2,}/gm," ")}if(i[2]!==void 0){return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n")}return void 0}};var ae=class extends se{static{s(this,"CommonValueConverter")}runCustomConverter(e,t,n){return void 0}};var oe=class extends r.QU{static{s(this,"AbstractMermaidTokenBuilder")}constructor(e){super();this.keywords=new Set(e)}buildKeywordTokens(e,t,n){const r=super.buildKeywordTokens(e,t,n);r.forEach((e=>{if(this.keywords.has(e.name)&&e.PATTERN!==void 0){e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))")}}));return r}};var ce=class extends oe{static{s(this,"CommonTokenBuilder")}}},24010:(e,t,n)=>{"use strict";n.d(t,{qg:()=>f});var r=n(98996);var i=n(34496);var s=n(7112);var a=n(95304);var o=n(75753);var c=n(75472);var u={};var l={info:(0,c.K2)((async()=>{const{createInfoServices:e}=await n.e(4617).then(n.bind(n,4617));const t=e().Info.parser.LangiumParser;u.info=t}),"info"),packet:(0,c.K2)((async()=>{const{createPacketServices:e}=await n.e(5863).then(n.bind(n,75863));const t=e().Packet.parser.LangiumParser;u.packet=t}),"packet"),pie:(0,c.K2)((async()=>{const{createPieServices:e}=await n.e(1134).then(n.bind(n,41134));const t=e().Pie.parser.LangiumParser;u.pie=t}),"pie"),architecture:(0,c.K2)((async()=>{const{createArchitectureServices:e}=await n.e(3091).then(n.bind(n,23091));const t=e().Architecture.parser.LangiumParser;u.architecture=t}),"architecture"),gitGraph:(0,c.K2)((async()=>{const{createGitGraphServices:e}=await n.e(8120).then(n.bind(n,18120));const t=e().GitGraph.parser.LangiumParser;u.gitGraph=t}),"gitGraph")};async function f(e,t){const n=l[e];if(!n){throw new Error(`Unknown diagram type: ${e}`)}if(!u[e]){await n()}const r=u[e];const i=r.parse(t);if(i.lexerErrors.length>0||i.parserErrors.length>0){throw new d(i)}return i.value}(0,c.K2)(f,"parse");var d=class extends Error{constructor(e){const t=e.lexerErrors.map((e=>e.message)).join("\n");const n=e.parserErrors.map((e=>e.message)).join("\n");super(`Parsing failed: ${t} ${n}`);this.result=e}static{(0,c.K2)(this,"MermaidParseError")}}},34050:(e,t,n)=>{"use strict";n.d(t,{kD:()=>o,QU:()=>Ch,dM:()=>$h,DD:()=>Om,tG:()=>km,uM:()=>xm,WQ:()=>Sm,y0:()=>Um});function r(e){return typeof e==="object"&&e!==null&&typeof e.$type==="string"}function i(e){return typeof e==="object"&&e!==null&&typeof e.$refText==="string"}function s(e){return typeof e==="object"&&e!==null&&typeof e.name==="string"&&typeof e.type==="string"&&typeof e.path==="string"}function a(e){return typeof e==="object"&&e!==null&&r(e.container)&&i(e.reference)&&typeof e.message==="string"}class o{constructor(){this.subtypes={};this.allSubtypes={}}isInstance(e,t){return r(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t){return true}let n=this.subtypes[e];if(!n){n=this.subtypes[e]={}}const r=n[t];if(r!==undefined){return r}else{const r=this.computeIsSubtype(e,t);n[t]=r;return r}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t){return t}else{const t=this.getAllTypes();const n=[];for(const r of t){if(this.isSubtype(r,e)){n.push(r)}}this.allSubtypes[e]=n;return n}}}function c(e){return typeof e==="object"&&e!==null&&Array.isArray(e.content)}function u(e){return typeof e==="object"&&e!==null&&typeof e.tokenType==="object"}function l(e){return c(e)&&typeof e.fullText==="string"}class f{constructor(e,t){this.startFn=e;this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0;let n=e.next();while(!n.done){t++;n=e.next()}return t}toArray(){const e=[];const t=this.iterator();let n;do{n=t.next();if(n.value!==undefined){e.push(n.value)}}while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){const n=this.map((n=>[e?e(n):n,t?t(n):n]));return new Map(n)}toString(){return this.join()}concat(e){const t=e[Symbol.iterator]();return new f((()=>({first:this.startFn(),firstDone:false})),(e=>{let n;if(!e.firstDone){do{n=this.nextFn(e.first);if(!n.done){return n}}while(!n.done);e.firstDone=true}do{n=t.next();if(!n.done){return n}}while(!n.done);return m}))}join(e=","){const t=this.iterator();let n="";let r;let i=false;do{r=t.next();if(!r.done){if(i){n+=e}n+=d(r.value)}i=true}while(!r.done);return n}indexOf(e,t=0){const n=this.iterator();let r=0;let i=n.next();while(!i.done){if(r>=t&&i.value===e){return r}i=n.next();r++}return-1}every(e){const t=this.iterator();let n=t.next();while(!n.done){if(!e(n.value)){return false}n=t.next()}return true}some(e){const t=this.iterator();let n=t.next();while(!n.done){if(e(n.value)){return true}n=t.next()}return false}forEach(e){const t=this.iterator();let n=0;let r=t.next();while(!r.done){e(r.value,n);r=t.next();n++}}map(e){return new f(this.startFn,(t=>{const{done:n,value:r}=this.nextFn(t);if(n){return m}else{return{done:false,value:e(r)}}}))}filter(e){return new f(this.startFn,(t=>{let n;do{n=this.nextFn(t);if(!n.done&&e(n.value)){return n}}while(!n.done);return m}))}nonNullable(){return this.filter((e=>e!==undefined&&e!==null))}reduce(e,t){const n=this.iterator();let r=t;let i=n.next();while(!i.done){if(r===undefined){r=i.value}else{r=e(r,i.value)}i=n.next()}return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){const r=e.next();if(r.done){return n}const i=this.recursiveReduce(e,t,n);if(i===undefined){return r.value}return t(i,r.value)}find(e){const t=this.iterator();let n=t.next();while(!n.done){if(e(n.value)){return n.value}n=t.next()}return undefined}findIndex(e){const t=this.iterator();let n=0;let r=t.next();while(!r.done){if(e(r.value)){return n}r=t.next();n++}return-1}includes(e){const t=this.iterator();let n=t.next();while(!n.done){if(n.value===e){return true}n=t.next()}return false}flatMap(e){return new f((()=>({this:this.startFn()})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(e.done){t.iterator=undefined}else{return e}}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(h(n)){t.iterator=n[Symbol.iterator]()}else{return{done:false,value:n}}}}while(t.iterator);return m}))}flat(e){if(e===undefined){e=1}if(e<=0){return this}const t=e>1?this.flat(e-1):this;return new f((()=>({this:t.startFn()})),(e=>{do{if(e.iterator){const t=e.iterator.next();if(t.done){e.iterator=undefined}else{return t}}const{done:n,value:r}=t.nextFn(e.this);if(!n){if(h(r)){e.iterator=r[Symbol.iterator]()}else{return{done:false,value:r}}}}while(e.iterator);return m}))}head(){const e=this.iterator();const t=e.next();if(t.done){return undefined}return t.value}tail(e=1){return new f((()=>{const t=this.startFn();for(let n=0;n<e;n++){const e=this.nextFn(t);if(e.done){return t}}return t}),this.nextFn)}limit(e){return new f((()=>({size:0,state:this.startFn()})),(t=>{t.size++;if(t.size>e){return m}return this.nextFn(t.state)}))}distinct(e){const t=new Set;return this.filter((n=>{const r=e?e(n):n;if(t.has(r)){return false}else{t.add(r);return true}}))}exclude(e,t){const n=new Set;for(const r of e){const e=t?t(r):r;n.add(e)}return this.filter((e=>{const r=t?t(e):e;return!n.has(r)}))}}function d(e){if(typeof e==="string"){return e}if(typeof e==="undefined"){return"undefined"}if(typeof e.toString==="function"){return e.toString()}return Object.prototype.toString.call(e)}function h(e){return!!e&&typeof e[Symbol.iterator]==="function"}const p=new f((()=>undefined),(()=>m));const m=Object.freeze({done:true,value:undefined});function g(...e){if(e.length===1){const t=e[0];if(t instanceof f){return t}if(h(t)){return new f((()=>t[Symbol.iterator]()),(e=>e.next()))}if(typeof t.length==="number"){return new f((()=>({index:0})),(e=>{if(e.index<t.length){return{done:false,value:t[e.index++]}}else{return m}}))}}if(e.length>1){return new f((()=>({collIndex:0,arrIndex:0})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done){return e}t.iterator=undefined}if(t.array){if(t.arrIndex<t.array.length){return{done:false,value:t.array[t.arrIndex++]}}t.array=undefined;t.arrIndex=0}if(t.collIndex<e.length){const n=e[t.collIndex++];if(h(n)){t.iterator=n[Symbol.iterator]()}else if(n&&typeof n.length==="number"){t.array=n}}}while(t.iterator||t.array||t.collIndex<e.length);return m}))}return p}class y extends f{constructor(e,t,n){super((()=>({iterators:(n===null||n===void 0?void 0:n.includeRoot)?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:false})),(e=>{if(e.pruned){e.iterators.pop();e.pruned=false}while(e.iterators.length>0){const n=e.iterators[e.iterators.length-1];const r=n.next();if(r.done){e.iterators.pop()}else{e.iterators.push(t(r.value)[Symbol.iterator]());return r}}return m}))}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=true},[Symbol.iterator]:()=>e};return e}}var A;(function(e){function t(e){return e.reduce(((e,t)=>e+t),0)}e.sum=t;function n(e){return e.reduce(((e,t)=>e*t),0)}e.product=n;function r(e){return e.reduce(((e,t)=>Math.min(e,t)))}e.min=r;function i(e){return e.reduce(((e,t)=>Math.max(e,t)))}e.max=i})(A||(A={}));function T(e){return new y(e,(e=>{if(c(e)){return e.content}else{return[]}}),{includeRoot:true})}function v(e){return T(e).filter(isLeafCstNode)}function E(e,t){while(e.container){e=e.container;if(e===t){return true}}return false}function R(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function k(e){if(!e){return undefined}const{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}var x;(function(e){e[e["Before"]=0]="Before";e[e["After"]=1]="After";e[e["OverlapFront"]=2]="OverlapFront";e[e["OverlapBack"]=3]="OverlapBack";e[e["Inside"]=4]="Inside"})(x||(x={}));function I(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<e.start.character){return x.Before}else if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>t.end.character){return x.After}const n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character;const r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;if(n&&r){return x.Inside}else if(n){return x.OverlapBack}else{return x.OverlapFront}}function S(e,t){const n=I(e,t);return n>x.After}const w=/^[\w\p{L}]$/u;function N(e,t,n=w){if(e){if(t>0){const r=t-e.offset;const i=e.text.charAt(r);if(!n.test(i)){t--}}return L(e,t)}return undefined}function C(e,t){if(e){const n=O(e,true);if(n&&$(n,t)){return n}if(l(e)){const n=e.content.findIndex((e=>!e.hidden));for(let r=n-1;r>=0;r--){const n=e.content[r];if($(n,t)){return n}}}}return undefined}function $(e,t){return u(e)&&t.includes(e.tokenType.name)}function L(e,t){if(isLeafCstNode(e)){return e}else if(isCompositeCstNode(e)){const n=_(e,t,false);if(n){return L(n,t)}}return undefined}function b(e,t){if(isLeafCstNode(e)){return e}else if(isCompositeCstNode(e)){const n=_(e,t,true);if(n){return b(n,t)}}return undefined}function _(e,t,n){let r=0;let i=e.content.length-1;let s=undefined;while(r<=i){const a=Math.floor((r+i)/2);const o=e.content[a];if(o.offset<=t&&o.end>t){return o}if(o.end<=t){s=n?o:undefined;r=a+1}else{i=a-1}}return s}function O(e,t=true){while(e.container){const n=e.container;let r=n.content.indexOf(e);while(r>0){r--;const e=n.content[r];if(t||!e.hidden){return e}}e=n}return undefined}function P(e,t=true){while(e.container){const n=e.container;let r=n.content.indexOf(e);const i=n.content.length-1;while(r<i){r++;const e=n.content[r];if(t||!e.hidden){return e}}e=n}return undefined}function M(e){if(e.range.start.character===0){return e}const t=e.range.start.line;let n=e;let r;while(e.container){const i=e.container;const s=r!==null&&r!==void 0?r:i.content.indexOf(e);if(s===0){e=i;r=undefined}else{r=s-1;e=i.content[r]}if(e.range.start.line!==t){break}n=e}return n}function D(e,t){const n=U(e,t);if(!n){return[]}return n.parent.content.slice(n.a+1,n.b)}function U(e,t){const n=F(e);const r=F(t);let i;for(let s=0;s<n.length&&s<r.length;s++){const e=n[s];const t=r[s];if(e.parent===t.parent){i={parent:e.parent,a:e.index,b:t.index}}else{break}}return i}function F(e){const t=[];while(e.container){const n=e.container;const r=n.content.indexOf(e);t.push({parent:n,index:r});e=n}return t.reverse()}class G extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function B(e){throw new Error("Error! The input value was not handled.")}const K={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/};const j="AbstractRule";function V(e){return $t.isInstance(e,j)}const W="AbstractType";function H(e){return $t.isInstance(e,W)}const z="Condition";function q(e){return $t.isInstance(e,z)}function Y(e){return X(e)||e==="current"||e==="entry"||e==="extends"||e==="false"||e==="fragment"||e==="grammar"||e==="hidden"||e==="import"||e==="interface"||e==="returns"||e==="terminal"||e==="true"||e==="type"||e==="infer"||e==="infers"||e==="with"||typeof e==="string"&&/\^?[_a-zA-Z][\w_]*/.test(e)}function X(e){return e==="string"||e==="number"||e==="boolean"||e==="Date"||e==="bigint"}const Q="TypeDefinition";function J(e){return $t.isInstance(e,Q)}const Z="ValueLiteral";function ee(e){return $t.isInstance(e,Z)}const te="AbstractElement";function ne(e){return $t.isInstance(e,te)}const re="ArrayLiteral";function ie(e){return $t.isInstance(e,re)}const se="ArrayType";function ae(e){return $t.isInstance(e,se)}const oe="BooleanLiteral";function ce(e){return $t.isInstance(e,oe)}const ue="Conjunction";function le(e){return $t.isInstance(e,ue)}const fe="Disjunction";function de(e){return $t.isInstance(e,fe)}const he="Grammar";function pe(e){return $t.isInstance(e,he)}const me="GrammarImport";function ge(e){return $t.isInstance(e,me)}const ye="InferredType";function Ae(e){return $t.isInstance(e,ye)}const Te="Interface";function ve(e){return $t.isInstance(e,Te)}const Ee="NamedArgument";function Re(e){return $t.isInstance(e,Ee)}const ke="Negation";function xe(e){return $t.isInstance(e,ke)}const Ie="NumberLiteral";function Se(e){return $t.isInstance(e,Ie)}const we="Parameter";function Ne(e){return $t.isInstance(e,we)}const Ce="ParameterReference";function $e(e){return $t.isInstance(e,Ce)}const Le="ParserRule";function be(e){return $t.isInstance(e,Le)}const _e="ReferenceType";function Oe(e){return $t.isInstance(e,_e)}const Pe="ReturnType";function Me(e){return $t.isInstance(e,Pe)}const De="SimpleType";function Ue(e){return $t.isInstance(e,De)}const Fe="StringLiteral";function Ge(e){return $t.isInstance(e,Fe)}const Be="TerminalRule";function Ke(e){return $t.isInstance(e,Be)}const je="Type";function Ve(e){return $t.isInstance(e,je)}const We="TypeAttribute";function He(e){return $t.isInstance(e,We)}const ze="UnionType";function qe(e){return $t.isInstance(e,ze)}const Ye="Action";function Xe(e){return $t.isInstance(e,Ye)}const Qe="Alternatives";function Je(e){return $t.isInstance(e,Qe)}const Ze="Assignment";function et(e){return $t.isInstance(e,Ze)}const tt="CharacterRange";function nt(e){return $t.isInstance(e,tt)}const rt="CrossReference";function it(e){return $t.isInstance(e,rt)}const st="EndOfFile";function at(e){return $t.isInstance(e,st)}const ot="Group";function ct(e){return $t.isInstance(e,ot)}const ut="Keyword";function lt(e){return $t.isInstance(e,ut)}const ft="NegatedToken";function dt(e){return $t.isInstance(e,ft)}const ht="RegexToken";function pt(e){return $t.isInstance(e,ht)}const mt="RuleCall";function gt(e){return $t.isInstance(e,mt)}const yt="TerminalAlternatives";function At(e){return $t.isInstance(e,yt)}const Tt="TerminalGroup";function vt(e){return $t.isInstance(e,Tt)}const Et="TerminalRuleCall";function Rt(e){return $t.isInstance(e,Et)}const kt="UnorderedGroup";function xt(e){return $t.isInstance(e,kt)}const It="UntilToken";function St(e){return $t.isInstance(e,It)}const wt="Wildcard";function Nt(e){return $t.isInstance(e,wt)}class Ct extends o{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,t){switch(e){case Ye:case Qe:case Ze:case tt:case rt:case st:case ot:case ut:case ft:case ht:case mt:case yt:case Tt:case Et:case kt:case It:case wt:{return this.isSubtype(te,t)}case re:case Ie:case Fe:{return this.isSubtype(Z,t)}case se:case _e:case De:case ze:{return this.isSubtype(Q,t)}case oe:{return this.isSubtype(z,t)||this.isSubtype(Z,t)}case ue:case fe:case ke:case Ce:{return this.isSubtype(z,t)}case ye:case Te:case je:{return this.isSubtype(W,t)}case Le:{return this.isSubtype(j,t)||this.isSubtype(W,t)}case Be:{return this.isSubtype(j,t)}default:{return false}}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":{return W}case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":{return j}case"Grammar:usedGrammars":{return he}case"NamedArgument:parameter":case"ParameterReference:parameter":{return we}case"TerminalRuleCall:rule":{return Be}default:{throw new Error(`${t} is not a valid reference id.`)}}}getTypeMetaData(e){switch(e){case"AbstractElement":{return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]}}case"ArrayLiteral":{return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]}}case"ArrayType":{return{name:"ArrayType",properties:[{name:"elementType"}]}}case"BooleanLiteral":{return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:false}]}}case"Conjunction":{return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]}}case"Disjunction":{return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]}}case"Grammar":{return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:false},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:false},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]}}case"GrammarImport":{return{name:"GrammarImport",properties:[{name:"path"}]}}case"InferredType":{return{name:"InferredType",properties:[{name:"name"}]}}case"Interface":{return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]}}case"NamedArgument":{return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:false},{name:"parameter"},{name:"value"}]}}case"Negation":{return{name:"Negation",properties:[{name:"value"}]}}case"NumberLiteral":{return{name:"NumberLiteral",properties:[{name:"value"}]}}case"Parameter":{return{name:"Parameter",properties:[{name:"name"}]}}case"ParameterReference":{return{name:"ParameterReference",properties:[{name:"parameter"}]}}case"ParserRule":{return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:false},{name:"definition"},{name:"entry",defaultValue:false},{name:"fragment",defaultValue:false},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:false}]}}case"ReferenceType":{return{name:"ReferenceType",properties:[{name:"referenceType"}]}}case"ReturnType":{return{name:"ReturnType",properties:[{name:"name"}]}}case"SimpleType":{return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]}}case"StringLiteral":{return{name:"StringLiteral",properties:[{name:"value"}]}}case"TerminalRule":{return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:false},{name:"hidden",defaultValue:false},{name:"name"},{name:"type"}]}}case"Type":{return{name:"Type",properties:[{name:"name"},{name:"type"}]}}case"TypeAttribute":{return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:false},{name:"name"},{name:"type"}]}}case"UnionType":{return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]}}case"Action":{return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]}}case"Alternatives":{return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]}}case"Assignment":{return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]}}case"CharacterRange":{return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]}}case"CrossReference":{return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:false},{name:"lookahead"},{name:"terminal"},{name:"type"}]}}case"EndOfFile":{return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]}}case"Group":{return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]}}case"Keyword":{return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]}}case"NegatedToken":{return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]}}case"RegexToken":{return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]}}case"RuleCall":{return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]}}case"TerminalAlternatives":{return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]}}case"TerminalGroup":{return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]}}case"TerminalRuleCall":{return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]}}case"UnorderedGroup":{return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]}}case"UntilToken":{return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]}}case"Wildcard":{return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]}}default:{return{name:e,properties:[]}}}}}const $t=new Ct;function Lt(e){for(const[t,n]of Object.entries(e)){if(!t.startsWith("$")){if(Array.isArray(n)){n.forEach(((n,i)=>{if(r(n)){n.$container=e;n.$containerProperty=t;n.$containerIndex=i}}))}else if(r(n)){n.$container=e;n.$containerProperty=t}}}}function bt(e,t){let n=e;while(n){if(t(n)){return n}n=n.$container}return undefined}function _t(e,t){let n=e;while(n){if(t(n)){return true}n=n.$container}return false}function Ot(e){const t=Pt(e);const n=t.$document;if(!n){throw new Error("AST node has no document.")}return n}function Pt(e){while(e.$container){e=e.$container}return e}function Mt(e,t){if(!e){throw new Error("Node must be an AstNode.")}const n=t===null||t===void 0?void 0:t.range;return new f((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{while(t.keyIndex<t.keys.length){const i=t.keys[t.keyIndex];if(!i.startsWith("$")){const s=e[i];if(r(s)){t.keyIndex++;if(Ft(s,n)){return{done:false,value:s}}}else if(Array.isArray(s)){while(t.arrayIndex<s.length){const e=t.arrayIndex++;const i=s[e];if(r(i)&&Ft(i,n)){return{done:false,value:i}}}t.arrayIndex=0}}t.keyIndex++}return m}))}function Dt(e,t){if(!e){throw new Error("Root node must be an AstNode.")}return new y(e,(e=>Mt(e,t)))}function Ut(e,t){if(!e){throw new Error("Root node must be an AstNode.")}else if((t===null||t===void 0?void 0:t.range)&&!Ft(e,t.range)){return new y(e,(()=>[]))}return new y(e,(e=>Mt(e,t)),{includeRoot:true})}function Ft(e,t){var n;if(!t){return true}const r=(n=e.$cstNode)===null||n===void 0?void 0:n.range;if(!r){return false}return S(r,t)}function Gt(e){return new f((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{while(t.keyIndex<t.keys.length){const n=t.keys[t.keyIndex];if(!n.startsWith("$")){const r=e[n];if(i(r)){t.keyIndex++;return{done:false,value:{reference:r,container:e,property:n}}}else if(Array.isArray(r)){while(t.arrayIndex<r.length){const s=t.arrayIndex++;const a=r[s];if(i(a)){return{done:false,value:{reference:a,container:e,property:n,index:s}}}}t.arrayIndex=0}}t.keyIndex++}return m}))}function Bt(e,t=Ot(e).parseResult.value){const n=[];Ut(t).forEach((t=>{Gt(t).forEach((t=>{if(t.reference.ref===e){n.push(t.reference)}}))}));return stream(n)}function Kt(e,t){const n=e.getTypeMetaData(t.$type);const r=t;for(const i of n.properties){if(i.defaultValue!==undefined&&r[i.name]===undefined){r[i.name]=jt(i.defaultValue)}}}function jt(e){if(Array.isArray(e)){return[...e.map(jt)]}else{return e}}function Vt(e,t){const n={$type:e.$type};for(const[r,i]of Object.entries(e)){if(!r.startsWith("$")){if(isAstNode(i)){n[r]=Vt(i,t)}else if(isReference(i)){n[r]=t(n,r,i.$refNode,i.$refText)}else if(Array.isArray(i)){const e=[];for(const s of i){if(isAstNode(s)){e.push(Vt(s,t))}else if(isReference(s)){e.push(t(n,r,s.$refNode,s.$refText))}else{e.push(s)}}n[r]=e}else{n[r]=i}}}Lt(n);return n}function Wt(e){return e.charCodeAt(0)}function Ht(e,t){if(Array.isArray(e)){e.forEach((function(e){t.push(e)}))}else{t.push(e)}}function zt(e,t){if(e[t]===true){throw"duplicate flag "+t}const n=e[t];e[t]=true}function qt(e){if(e===undefined){throw Error("Internal Error - Should never get here!")}return true}function Yt(){throw Error("Internal Error - Should never get here!")}function Xt(e){return e["type"]==="Character"}const Qt=[];for(let Fm=Wt("0");Fm<=Wt("9");Fm++){Qt.push(Fm)}const Jt=[Wt("_")].concat(Qt);for(let Fm=Wt("a");Fm<=Wt("z");Fm++){Jt.push(Fm)}for(let Fm=Wt("A");Fm<=Wt("Z");Fm++){Jt.push(Fm)}const Zt=[Wt(" "),Wt("\f"),Wt("\n"),Wt("\r"),Wt("\t"),Wt("\v"),Wt("\t"),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt(" "),Wt("\u2028"),Wt("\u2029"),Wt(" "),Wt(" "),Wt(" "),Wt("\ufeff")];const en=/[0-9a-fA-F]/;const tn=/[0-9]/;const nn=/[1-9]/;class rn{constructor(){this.idx=0;this.input="";this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx;this.input=e.input;this.groupIdx=e.groupIdx}pattern(e){this.idx=0;this.input=e;this.groupIdx=0;this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:false,ignoreCase:false,multiLine:false,unicode:false,sticky:false};while(this.isRegExpFlag()){switch(this.popChar()){case"g":zt(n,"global");break;case"i":zt(n,"ignoreCase");break;case"m":zt(n,"multiLine");break;case"u":zt(n,"unicode");break;case"y":zt(n,"sticky");break}}if(this.idx!==this.input.length){throw Error("Redundant input: "+this.input.substring(this.idx))}return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[];const t=this.idx;e.push(this.alternative());while(this.peekChar()==="|"){this.consumeChar("|");e.push(this.alternative())}return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[];const t=this.idx;while(this.isTerm()){e.push(this.term())}return{type:"Alternative",value:e,loc:this.loc(t)}}term(){if(this.isAssertion()){return this.assertion()}else{return this.atom()}}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break}qt(t);const n=this.disjunction();this.consumeChar(")");return{type:t,value:n,loc:this.loc(e)}}return Yt()}quantifier(e=false){let t=undefined;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:Infinity};break;case"+":t={atLeast:1,atMost:Infinity};break;case"?":t={atLeast:0,atMost:1};break;case"{":const n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let e;if(this.isDigit()){e=this.integerIncludingZero();t={atLeast:n,atMost:e}}else{t={atLeast:n,atMost:Infinity}}this.consumeChar("}");break}if(e===true&&t===undefined){return undefined}qt(t);break}if(e===true&&t===undefined){return undefined}if(qt(t)){if(this.peekChar(0)==="?"){this.consumeChar("?");t.greedy=false}else{t.greedy=true}t.type="Quantifier";t.loc=this.loc(n);return t}}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===undefined&&this.isPatternCharacter()){e=this.patternCharacter()}if(qt(e)){e.loc=this.loc(t);if(this.isQuantifier()){e.quantifier=this.quantifier()}return e}return Yt()}dotAll(){this.consumeChar(".");return{type:"Set",complement:true,value:[Wt("\n"),Wt("\r"),Wt("\u2028"),Wt("\u2029")]}}atomEscape(){this.consumeChar("\\");switch(this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){const e=this.positiveInteger();return{type:"GroupBackReference",value:e}}characterClassEscape(){let e;let t=false;switch(this.popChar()){case"d":e=Qt;break;case"D":e=Qt;t=true;break;case"s":e=Zt;break;case"S":e=Zt;t=true;break;case"w":e=Jt;break;case"W":e=Jt;t=true;break}if(qt(e)){return{type:"Set",value:e,complement:t}}return Yt()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Wt("\f");break;case"n":e=Wt("\n");break;case"r":e=Wt("\r");break;case"t":e=Wt("\t");break;case"v":e=Wt("\v");break}if(qt(e)){return{type:"Character",value:e}}return Yt()}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===false){throw Error("Invalid ")}const t=e.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:t}}nulCharacterAtom(){this.consumeChar("0");return{type:"Character",value:Wt("\0")}}hexEscapeSequenceAtom(){this.consumeChar("x");return this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){this.consumeChar("u");return this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:Wt(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const e=this.popChar();return{type:"Character",value:Wt(e)}}}characterClass(){const e=[];let t=false;this.consumeChar("[");if(this.peekChar(0)==="^"){this.consumeChar("^");t=true}while(this.isClassAtom()){const t=this.classAtom();const n=t.type==="Character";if(Xt(t)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();const r=n.type==="Character";if(Xt(n)){if(n.value<t.value){throw Error("Range out of order in character class")}e.push({from:t.value,to:n.value})}else{Ht(t.value,e);e.push(Wt("-"));Ht(n.value,e)}}else{Ht(t.value,e)}}this.consumeChar("]");return{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){this.consumeChar("\\");switch(this.peekChar()){case"b":this.consumeChar("b");return{type:"Character",value:Wt("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=true;this.consumeChar("(");switch(this.peekChar(0)){case"?":this.consumeChar("?");this.consumeChar(":");e=false;break;default:this.groupIdx++;break}const t=this.disjunction();this.consumeChar(")");const n={type:"Group",capturing:e,value:t};if(e){n["idx"]=this.groupIdx}return n}positiveInteger(){let e=this.popChar();if(nn.test(e)===false){throw Error("Expecting a positive integer")}while(tn.test(this.peekChar(0))){e+=this.popChar()}return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(tn.test(e)===false){throw Error("Expecting an integer")}while(tn.test(this.peekChar(0))){e+=this.popChar()}return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Wt(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return true;default:return false}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return tn.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return false;default:return true}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter()){return true}switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return true;default:return false}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return true;case"\\":switch(this.peekChar(1)){case"b":case"B":return true;default:return false}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return false}}isQuantifier(){const e=this.saveState();try{return this.quantifier(true)!==undefined}catch(t){return false}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return false;default:return true}}parseHexDigits(e){let t="";for(let r=0;r<e;r++){const e=this.popChar();if(en.test(e)===false){throw Error("Expecting a HexDecimal digits")}t+=e}const n=parseInt(t,16);return{type:"Character",value:n}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const e=this.peekChar(0);this.consumeChar(undefined);return e}consumeChar(e){if(e!==undefined&&this.input[this.idx]!==e){throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx)}if(this.idx>=this.input.length){throw Error("Unexpected end of input")}this.idx++}loc(e){return{begin:e,end:this.idx}}}class sn{visitChildren(e){for(const t in e){const n=e[t];if(e.hasOwnProperty(t)){if(n.type!==undefined){this.visit(n)}else if(Array.isArray(n)){n.forEach((e=>{this.visit(e)}),this)}}}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const an=/\r?\n/gm;const on=new rn;class cn extends sn{constructor(){super(...arguments);this.isStarting=true;this.endRegexpStack=[];this.multiline=false}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=false;this.regex=e;this.startRegexp="";this.isStarting=true;this.endRegexpStack=[]}visitGroup(e){if(e.quantifier){this.isStarting=false;this.endRegexpStack=[]}}visitCharacter(e){const t=String.fromCharCode(e.value);if(!this.multiline&&t==="\n"){this.multiline=true}if(e.quantifier){this.isStarting=false;this.endRegexpStack=[]}else{const e=hn(t);this.endRegexpStack.push(e);if(this.isStarting){this.startRegexp+=e}}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end);const n=new RegExp(t);this.multiline=Boolean("\n".match(n))}if(e.quantifier){this.isStarting=false;this.endRegexpStack=[]}else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t);if(this.isStarting){this.startRegexp+=t}}}visitChildren(e){if(e.type==="Group"){const t=e;if(t.quantifier){return}}super.visitChildren(e)}}const un=new cn;function ln(e){try{if(typeof e!=="string"){e=e.source}e=`/${e}/`;const t=on.pattern(e);const n=[];for(const r of t.value.value){un.reset(e);un.visit(r);n.push({start:un.startRegexp,end:un.endRegex})}return n}catch(t){return[]}}function fn(e){try{if(typeof e==="string"){e=new RegExp(e)}e=e.toString();un.reset(e);un.visit(on.pattern(e));return un.multiline}catch(t){return false}}function dn(e){const t=typeof e==="string"?new RegExp(e):e;return t.test(" ")}function hn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pn(e){return Array.prototype.map.call(e,(e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:hn(e))).join("")}function mn(e,t){const n=gn(e);const r=t.match(n);return!!r&&r[0].length>0}function gn(e){if(typeof e==="string"){e=new RegExp(e)}const t=e,n=e.source;let r=0;function i(){let e="",s;function a(t){e+=n.substr(r,t);r+=t}function o(t){e+="(?:"+n.substr(r,t)+"|$)";r+=t}while(r<n.length){switch(n[r]){case"\\":switch(n[r+1]){case"c":o(3);break;case"x":o(4);break;case"u":if(t.unicode){if(n[r+2]==="{"){o(n.indexOf("}",r)-r+1)}else{o(6)}}else{o(2)}break;case"p":case"P":if(t.unicode){o(n.indexOf("}",r)-r+1)}else{o(2)}break;case"k":o(n.indexOf(">",r)-r+1);break;default:o(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g;s.lastIndex=r;s=s.exec(n)||[];o(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":a(1);break;case"{":s=/\{\d+,?\d*\}/g;s.lastIndex=r;s=s.exec(n);if(s){a(s[0].length)}else{o(1)}break;case"(":if(n[r+1]==="?"){switch(n[r+2]){case":":e+="(?:";r+=3;e+=i()+"|$)";break;case"=":e+="(?=";r+=3;e+=i()+")";break;case"!":s=r;r+=3;i();e+=n.substr(s,r-s);break;case"<":switch(n[r+3]){case"=":case"!":s=r;r+=4;i();e+=n.substr(s,r-s);break;default:a(n.indexOf(">",r)-r+1);e+=i()+"|$)";break}break}}else{a(1);e+=i()+"|$)"}break;case")":++r;return e;default:o(1);break}}return e}return new RegExp(i(),e.flags)}function yn(e){return e.rules.find((e=>be(e)&&e.entry))}function An(e){return e.rules.filter((e=>Ke(e)&&e.hidden))}function Tn(e,t){const n=new Set;const r=yn(e);if(!r){return new Set(e.rules)}const i=[r].concat(An(e));for(const a of i){vn(a,n,t)}const s=new Set;for(const a of e.rules){if(n.has(a.name)||Ke(a)&&a.hidden){s.add(a)}}return s}function vn(e,t,n){t.add(e.name);Dt(e).forEach((e=>{if(gt(e)||n&&Rt(e)){const r=e.rule.ref;if(r&&!t.has(r.name)){vn(r,t,n)}}}))}function En(e){if(e.terminal){return e.terminal}else if(e.type.ref){const t=$n(e.type.ref);return t===null||t===void 0?void 0:t.terminal}return undefined}function Rn(e){return e.hidden&&!Vn(e).test(" ")}function kn(e,t){if(!e||!t){return[]}return In(e,t,e.astNode,true)}function xn(e,t,n){if(!e||!t){return undefined}const r=In(e,t,e.astNode,true);if(r.length===0){return undefined}if(n!==undefined){n=Math.max(0,Math.min(n,r.length-1))}else{n=0}return r[n]}function In(e,t,n,r){if(!r){const n=bt(e.grammarSource,et);if(n&&n.feature===t){return[e]}}if(c(e)&&e.astNode===n){return e.content.flatMap((e=>In(e,t,n,false)))}return[]}function Sn(e,t){if(!e){return[]}return Nn(e,t,e===null||e===void 0?void 0:e.astNode)}function wn(e,t,n){if(!e){return undefined}const r=Nn(e,t,e===null||e===void 0?void 0:e.astNode);if(r.length===0){return undefined}if(n!==undefined){n=Math.max(0,Math.min(n,r.length-1))}else{n=0}return r[n]}function Nn(e,t,n){if(e.astNode!==n){return[]}if(lt(e.grammarSource)&&e.grammarSource.value===t){return[e]}const r=T(e).iterator();let i;const s=[];do{i=r.next();if(!i.done){const e=i.value;if(e.astNode===n){if(lt(e.grammarSource)&&e.grammarSource.value===t){s.push(e)}}else{r.prune()}}}while(!i.done);return s}function Cn(e){var t;const n=e.astNode;while(n===((t=e.container)===null||t===void 0?void 0:t.astNode)){const t=bt(e.grammarSource,et);if(t){return t}e=e.container}return undefined}function $n(e){let t=e;if(Ae(t)){if(Xe(t.$container)){t=t.$container.$container}else if(be(t.$container)){t=t.$container}else{B(t.$container)}}return Ln(e,t,new Map)}function Ln(e,t,n){var r;function i(t,r){let i=undefined;const s=bt(t,et);if(!s){i=Ln(r,r,n)}n.set(e,i);return i}if(n.has(e)){return n.get(e)}n.set(e,undefined);for(const s of Dt(t)){if(et(s)&&s.feature.toLowerCase()==="name"){n.set(e,s);return s}else if(gt(s)&&be(s.rule.ref)){return i(s,s.rule.ref)}else if(Ue(s)&&((r=s.typeRef)===null||r===void 0?void 0:r.ref)){return i(s,s.typeRef.ref)}}return undefined}function bn(e){const t=e.$container;if(ast.isGroup(t)){const n=t.elements;const r=n.indexOf(e);for(let e=r-1;e>=0;e--){const t=n[e];if(ast.isAction(t)){return t}else{const t=streamAllContents(n[e]).find(ast.isAction);if(t){return t}}}}if(ast.isAbstractElement(t)){return bn(t)}else{return undefined}}function _n(e,t){return e==="?"||e==="*"||ast.isGroup(t)&&Boolean(t.guardCondition)}function On(e){return e==="*"||e==="+"}function Pn(e){return e==="+="}function Mn(e){return Dn(e,new Set)}function Dn(e,t){if(t.has(e)){return true}else{t.add(e)}for(const n of Dt(e)){if(gt(n)){if(!n.rule.ref){return false}if(be(n.rule.ref)&&!Dn(n.rule.ref,t)){return false}}else if(et(n)){return false}else if(Xe(n)){return false}}return Boolean(e.definition)}function Un(e){return Fn(e.type,new Set)}function Fn(e,t){if(t.has(e)){return true}else{t.add(e)}if(ast.isArrayType(e)){return false}else if(ast.isReferenceType(e)){return false}else if(ast.isUnionType(e)){return e.types.every((e=>Fn(e,t)))}else if(ast.isSimpleType(e)){if(e.primitiveType!==undefined){return true}else if(e.stringType!==undefined){return true}else if(e.typeRef!==undefined){const n=e.typeRef.ref;if(ast.isType(n)){return Fn(n.type,t)}else{return false}}else{return false}}else{return false}}function Gn(e){if(e.inferredType){return e.inferredType.name}else if(e.dataType){return e.dataType}else if(e.returnType){const t=e.returnType.ref;if(t){if(be(t)){return t.name}else if(ve(t)||Ve(t)){return t.name}}}return undefined}function Bn(e){var t;if(be(e)){return Mn(e)?e.name:(t=Gn(e))!==null&&t!==void 0?t:e.name}else if(ve(e)||Ve(e)||Me(e)){return e.name}else if(Xe(e)){const t=Kn(e);if(t){return t}}else if(Ae(e)){return e.name}throw new Error("Cannot get name of Unknown Type")}function Kn(e){var t;if(e.inferredType){return e.inferredType.name}else if((t=e.type)===null||t===void 0?void 0:t.ref){return Bn(e.type.ref)}return undefined}function jn(e){var t,n,r;if(Ke(e)){return(n=(t=e.type)===null||t===void 0?void 0:t.name)!==null&&n!==void 0?n:"string"}else{return Mn(e)?e.name:(r=Gn(e))!==null&&r!==void 0?r:e.name}}function Vn(e){const t={s:false,i:false,u:false};const n=Hn(e.definition,t);const r=Object.entries(t).filter((([,e])=>e)).map((([e])=>e)).join("");return new RegExp(n,r)}const Wn=/[\s\S]/.source;function Hn(e,t){if(At(e)){return zn(e)}else if(vt(e)){return qn(e)}else if(nt(e)){return Qn(e)}else if(Rt(e)){const t=e.rule.ref;if(!t){throw new Error("Missing rule reference.")}return Zn(Hn(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead})}else if(dt(e)){return Xn(e)}else if(St(e)){return Yn(e)}else if(pt(e)){const n=e.regex.lastIndexOf("/");const r=e.regex.substring(1,n);const i=e.regex.substring(n+1);if(t){t.i=i.includes("i");t.s=i.includes("s");t.u=i.includes("u")}return Zn(r,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:false})}else if(Nt(e)){return Zn(Wn,{cardinality:e.cardinality,lookahead:e.lookahead})}else{throw new Error(`Invalid terminal element: ${e===null||e===void 0?void 0:e.$type}`)}}function zn(e){return Zn(e.elements.map((e=>Hn(e))).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead})}function qn(e){return Zn(e.elements.map((e=>Hn(e))).join(""),{cardinality:e.cardinality,lookahead:e.lookahead})}function Yn(e){return Zn(`${Wn}*?${Hn(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead})}function Xn(e){return Zn(`(?!${Hn(e.terminal)})${Wn}*?`,{cardinality:e.cardinality,lookahead:e.lookahead})}function Qn(e){if(e.right){return Zn(`[${Jn(e.left)}-${Jn(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:false})}return Zn(Jn(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,wrap:false})}function Jn(e){return hn(e.value)}function Zn(e,t){var n;if(t.wrap!==false||t.lookahead){e=`(${(n=t.lookahead)!==null&&n!==void 0?n:""}${e})`}if(t.cardinality){return`${e}${t.cardinality}`}return e}function er(e){const t=[];const n=e.Grammar;for(const r of n.rules){if(Ke(r)&&Rn(r)&&fn(Vn(r))){t.push(r.name)}}return{multilineCommentRules:t,nameRegexp:w}}var tr=n(69769);var nr=n(44882);var rr=n(74650);var ir=n(8937);var sr=n(2850);var ar=n(97134);function or(e){function t(){}t.prototype=e;const n=new t;function r(){return typeof n.bar}r();r();if(true)return e;(0,eval)(e)}function cr(e,t,n){var r=-1,i=e.length;if(t<0){t=-t>i?0:i+t}n=n>i?i:n;if(n<0){n+=i}i=t>n?0:n-t>>>0;t>>>=0;var s=Array(i);while(++r<i){s[r]=e[r+t]}return s}const ur=cr;var lr=n(29914);function fr(e,t,n){var r=e==null?0:e.length;if(!r){return[]}t=n||t===undefined?1:(0,lr.A)(t);return ur(e,t<0?0:t,r)}const dr=fr;var hr=n(86378);var pr=n(16542);var mr=n(376);var gr=n(56280);var yr=n(21585);var Ar=n(690);var Tr=n(37947);var vr=Object.prototype;var Er=vr.hasOwnProperty;var Rr=(0,gr.A)((function(e,t){if((0,Ar.A)(t)||(0,yr.A)(t)){(0,mr.A)(t,(0,Tr.A)(t),e);return}for(var n in t){if(Er.call(t,n)){(0,pr.A)(e,n,t[n])}}}));const kr=Rr;var xr=n(98519);var Ir=n(1121);var Sr=n(44835);var wr=n(37138);function Nr(e,t){if(e==null){return{}}var n=(0,xr.A)((0,wr.A)(e),(function(e){return[e]}));t=(0,Ir.A)(t);return(0,Sr.A)(e,n,(function(e,n){return t(e,n[0])}))}const Cr=Nr;var $r=n(64128);var Lr=n(53315);var br="[object RegExp]";function _r(e){return(0,Lr.A)(e)&&(0,$r.A)(e)==br}const Or=_r;var Pr=n(26132);var Mr=n(89986);var Dr=Mr.A&&Mr.A.isRegExp;var Ur=Dr?(0,Pr.A)(Dr):Or;const Fr=Ur;function Gr(e){if(Br(e)){return e.LABEL}else{return e.name}}function Br(e){return(0,hr.A)(e.LABEL)&&e.LABEL!==""}class Kr{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this);(0,tr.A)(this.definition,(t=>{t.accept(e)}))}}class jr extends Kr{constructor(e){super([]);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}set definition(e){}get definition(){if(this.referencedRule!==undefined){return this.referencedRule.definition}return[]}accept(e){e.visit(this)}}class Vr extends Kr{constructor(e){super(e.definition);this.orgText="";kr(this,Cr(e,(e=>e!==undefined)))}}class Wr extends Kr{constructor(e){super(e.definition);this.ignoreAmbiguities=false;kr(this,Cr(e,(e=>e!==undefined)))}}class Hr extends Kr{constructor(e){super(e.definition);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}}class zr extends Kr{constructor(e){super(e.definition);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}}class qr extends Kr{constructor(e){super(e.definition);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}}class Yr extends Kr{constructor(e){super(e.definition);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}}class Xr extends Kr{constructor(e){super(e.definition);this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}}class Qr extends Kr{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition);this.idx=1;this.ignoreAmbiguities=false;this.hasPredicates=false;kr(this,Cr(e,(e=>e!==undefined)))}}class Jr{constructor(e){this.idx=1;kr(this,Cr(e,(e=>e!==undefined)))}accept(e){e.visit(this)}}function Zr(e){return(0,ir.A)(e,ei)}function ei(e){function t(e){return(0,ir.A)(e,ei)}if(e instanceof jr){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if((0,hr.A)(e.label)){t.label=e.label}return t}else if(e instanceof Wr){return{type:"Alternative",definition:t(e.definition)}}else if(e instanceof Hr){return{type:"Option",idx:e.idx,definition:t(e.definition)}}else if(e instanceof zr){return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)}}else if(e instanceof qr){return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:ei(new Jr({terminalType:e.separator})),definition:t(e.definition)}}else if(e instanceof Xr){return{type:"RepetitionWithSeparator",idx:e.idx,separator:ei(new Jr({terminalType:e.separator})),definition:t(e.definition)}}else if(e instanceof Yr){return{type:"Repetition",idx:e.idx,definition:t(e.definition)}}else if(e instanceof Qr){return{type:"Alternation",idx:e.idx,definition:t(e.definition)}}else if(e instanceof Jr){const t={type:"Terminal",name:e.terminalType.name,label:Gr(e.terminalType),idx:e.idx};if((0,hr.A)(e.label)){t.terminalLabel=e.label}const n=e.terminalType.PATTERN;if(e.terminalType.PATTERN){t.pattern=Fr(n)?n.source:n}return t}else if(e instanceof Vr){return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)}}else{throw Error("non exhaustive match")}}class ti{visit(e){const t=e;switch(t.constructor){case jr:return this.visitNonTerminal(t);case Wr:return this.visitAlternative(t);case Hr:return this.visitOption(t);case zr:return this.visitRepetitionMandatory(t);case qr:return this.visitRepetitionMandatoryWithSeparator(t);case Xr:return this.visitRepetitionWithSeparator(t);case Yr:return this.visitRepetition(t);case Qr:return this.visitAlternation(t);case Jr:return this.visitTerminal(t);case Vr:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}var ni=n(95345);var ri=n(15912);function ii(e,t){var n;(0,ri.A)(e,(function(e,r,i){n=t(e,r,i);return!n}));return!!n}const si=ii;var ai=n(39990);var oi=n(31943);function ci(e,t,n){var r=(0,ai.A)(e)?ni.A:si;if(n&&(0,oi.A)(e,t,n)){t=undefined}return r(e,(0,Ir.A)(t,3))}const ui=ci;var li=n(54949);var fi=Math.max;function di(e,t,n,r){e=(0,yr.A)(e)?e:(0,nr.A)(e);n=n&&!r?(0,lr.A)(n):0;var i=e.length;if(n<0){n=fi(i+n,0)}return(0,hr.A)(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&(0,li.A)(e,t,n)>-1}const hi=di;function pi(e,t){var n=-1,r=e==null?0:e.length;while(++n<r){if(!t(e[n],n,e)){return false}}return true}const mi=pi;function gi(e,t){var n=true;(0,ri.A)(e,(function(e,r,i){n=!!t(e,r,i);return n}));return n}const yi=gi;function Ai(e,t,n){var r=(0,ai.A)(e)?mi:yi;if(n&&(0,oi.A)(e,t,n)){t=undefined}return r(e,(0,Ir.A)(t,3))}const Ti=Ai;function vi(e){return e instanceof Wr||e instanceof Hr||e instanceof Yr||e instanceof zr||e instanceof qr||e instanceof Xr||e instanceof Jr||e instanceof Vr}function Ei(e,t=[]){const n=e instanceof Hr||e instanceof Yr||e instanceof Xr;if(n){return true}if(e instanceof Qr){return ui(e.definition,(e=>Ei(e,t)))}else if(e instanceof jr&&hi(t,e)){return false}else if(e instanceof Kr){if(e instanceof jr){t.push(e)}return Ti(e.definition,(e=>Ei(e,t)))}else{return false}}function Ri(e){return e instanceof Qr}function ki(e){if(e instanceof jr){return"SUBRULE"}else if(e instanceof Hr){return"OPTION"}else if(e instanceof Qr){return"OR"}else if(e instanceof zr){return"AT_LEAST_ONE"}else if(e instanceof qr){return"AT_LEAST_ONE_SEP"}else if(e instanceof Xr){return"MANY_SEP"}else if(e instanceof Yr){return"MANY"}else if(e instanceof Jr){return"CONSUME"}else{throw Error("non exhaustive match")}}class xi{walk(e,t=[]){(0,tr.A)(e.definition,((n,r)=>{const i=dr(e.definition,r+1);if(n instanceof jr){this.walkProdRef(n,i,t)}else if(n instanceof Jr){this.walkTerminal(n,i,t)}else if(n instanceof Wr){this.walkFlat(n,i,t)}else if(n instanceof Hr){this.walkOption(n,i,t)}else if(n instanceof zr){this.walkAtLeastOne(n,i,t)}else if(n instanceof qr){this.walkAtLeastOneSep(n,i,t)}else if(n instanceof Xr){this.walkManySep(n,i,t)}else if(n instanceof Yr){this.walkMany(n,i,t)}else if(n instanceof Qr){this.walkOr(n,i,t)}else{throw Error("non exhaustive match")}}))}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new Hr({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=Ii(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new Hr({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=Ii(e,t,n);this.walk(e,r)}walkOr(e,t,n){const r=t.concat(n);(0,tr.A)(e.definition,(e=>{const t=new Wr({definition:[e]});this.walk(t,r)}))}}function Ii(e,t,n){const r=[new Hr({definition:[new Jr({terminalType:e.separator})].concat(e.definition)})];const i=r.concat(t,n);return i}var Si=n(19363);function wi(e){return e&&e.length?(0,Si.A)(e):[]}const Ni=wi;var Ci=n(74033);function $i(e){if(e instanceof jr){return $i(e.referencedRule)}else if(e instanceof Jr){return _i(e)}else if(vi(e)){return Li(e)}else if(Ri(e)){return bi(e)}else{throw Error("non exhaustive match")}}function Li(e){let t=[];const n=e.definition;let r=0;let i=n.length>r;let s;let a=true;while(i&&a){s=n[r];a=Ei(s);t=t.concat($i(s));r=r+1;i=n.length>r}return Ni(t)}function bi(e){const t=(0,ir.A)(e.definition,(e=>$i(e)));return Ni((0,Ci.A)(t))}function _i(e){return[e.terminalType]}const Oi="_~IN~_";class Pi extends xi{constructor(e){super();this.topProd=e;this.follows={}}startWalking(){this.walk(this.topProd);return this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=Di(e.referencedRule,e.idx)+this.topProd.name;const i=t.concat(n);const s=new Wr({definition:i});const a=$i(s);this.follows[r]=a}}function Mi(e){const t={};(0,tr.A)(e,(e=>{const n=new Pi(e).startWalking();kr(t,n)}));return t}function Di(e,t){return e.name+t+Oi}function Ui(e){const t=e.terminalType.name;return t+e.idx+IN}var Fi=n(11904);var Gi=n(38693);var Bi=n(89191);var Ki=n(64725);var ji="Expected a function";function Vi(e){if(typeof e!="function"){throw new TypeError(ji)}return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}const Wi=Vi;function Hi(e,t){var n=(0,ai.A)(e)?Bi.A:Ki.A;return n(e,Wi((0,Ir.A)(t,3)))}const zi=Hi;var qi=n(58807);var Yi=Math.max;function Xi(e,t,n){var r=e==null?0:e.length;if(!r){return-1}var i=n==null?0:(0,lr.A)(n);if(i<0){i=Yi(r+i,0)}return(0,li.A)(e,t,i)}const Qi=Xi;var Ji=n(65339);var Zi=n(97133);var es=n(63344);var ts=n(43212);var ns=n(7348);var rs=n(4832);var is=200;function ss(e,t,n,r){var i=-1,s=ts.A,a=true,o=e.length,c=[],u=t.length;if(!o){return c}if(n){t=(0,xr.A)(t,(0,Pr.A)(n))}if(r){s=ns.A;a=false}else if(t.length>=is){s=rs.A;a=false;t=new es.A(t)}e:while(++i<o){var l=e[i],f=n==null?l:n(l);l=r||l!==0?l:0;if(a&&f===f){var d=u;while(d--){if(t[d]===f){continue e}}c.push(l)}else if(!s(t,f,r)){c.push(l)}}return c}const as=ss;var os=n(62040);var cs=n(55881);var us=n(10654);var ls=(0,cs.A)((function(e,t){return(0,us.A)(e)?as(e,(0,os.A)(t,1,us.A,true)):[]}));const fs=ls;function ds(e){var t=-1,n=e==null?0:e.length,r=0,i=[];while(++t<n){var s=e[t];if(s){i[r++]=s}}return i}const hs=ds;function ps(e){return e&&e.length?e[0]:undefined}const ms=ps;var gs=n(85075);function ys(e){if(console&&console.error){console.error(`Error: ${e}`)}}function As(e){if(console&&console.warn){console.warn(`Warning: ${e}`)}}let Ts={};const vs=new rn;function Es(e){const t=e.toString();if(Ts.hasOwnProperty(t)){return Ts[t]}else{const e=vs.pattern(t);Ts[t]=e;return e}}function Rs(){Ts={}}const ks="Complement Sets are not supported for first char optimization";const xs='Unable to use "first char" lexer optimizations:\n';function Is(e,t=false){try{const t=Es(e);const n=Ss(t.value,{},t.flags.ignoreCase);return n}catch(n){if(n.message===ks){if(t){As(`${xs}`+`\tUnable to optimize: < ${e.toString()} >\n`+"\tComplement Sets cannot be automatically optimized.\n"+"\tThis will disable the lexer's first char optimizations.\n"+"\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.")}}else{let n="";if(t){n="\n\tThis will disable the lexer's first char optimizations.\n"+"\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."}ys(`${xs}\n`+`\tFailed parsing: < ${e.toString()} >\n`+`\tUsing the @chevrotain/regexp-to-ast library\n`+"\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues"+n)}}return[]}function Ss(e,t,n){switch(e.type){case"Disjunction":for(let i=0;i<e.value.length;i++){Ss(e.value[i],t,n)}break;case"Alternative":const r=e.value;for(let e=0;e<r.length;e++){const i=r[e];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const s=i;switch(s.type){case"Character":ws(s.value,t,n);break;case"Set":if(s.complement===true){throw Error(ks)}(0,tr.A)(s.value,(e=>{if(typeof e==="number"){ws(e,t,n)}else{const r=e;if(n===true){for(let e=r.from;e<=r.to;e++){ws(e,t,n)}}else{for(let e=r.from;e<=r.to&&e<pa;e++){ws(e,t,n)}if(r.to>=pa){const e=r.from>=pa?r.from:pa;const n=r.to;const i=ga(e);const s=ga(n);for(let r=i;r<=s;r++){t[r]=r}}}}}));break;case"Group":Ss(s.value,t,n);break;default:throw Error("Non Exhaustive Match")}const a=s.quantifier!==undefined&&s.quantifier.atLeast===0;if(s.type==="Group"&&$s(s)===false||s.type!=="Group"&&a===false){break}}break;default:throw Error("non exhaustive match!")}return(0,nr.A)(t)}function ws(e,t,n){const r=ga(e);t[r]=r;if(n===true){Ns(e,t)}}function Ns(e,t){const n=String.fromCharCode(e);const r=n.toUpperCase();if(r!==n){const e=ga(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=ga(e.charCodeAt(0));t[n]=n}}}function Cs(e,t){return(0,gs.A)(e.value,(e=>{if(typeof e==="number"){return hi(t,e)}else{const n=e;return(0,gs.A)(t,(e=>n.from<=e&&e<=n.to))!==undefined}}))}function $s(e){const t=e.quantifier;if(t&&t.atLeast===0){return true}if(!e.value){return false}return(0,ai.A)(e.value)?Ti(e.value,$s):$s(e.value)}class Ls extends sn{constructor(e){super();this.targetCharCodes=e;this.found=false}visitChildren(e){if(this.found===true){return}switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}visitCharacter(e){if(hi(this.targetCharCodes,e.value)){this.found=true}}visitSet(e){if(e.complement){if(Cs(e,this.targetCharCodes)===undefined){this.found=true}}else{if(Cs(e,this.targetCharCodes)!==undefined){this.found=true}}}}function bs(e,t){if(t instanceof RegExp){const n=Es(t);const r=new Ls(e);r.visit(n);return r.found}else{return(0,gs.A)(t,(t=>hi(e,t.charCodeAt(0))))!==undefined}}const _s="PATTERN";const Os="defaultMode";const Ps="modes";let Ms=typeof new RegExp("(?:)").sticky==="boolean";function Ds(){Ms=false}function Us(){Ms=true}function Fs(e,t){t=(0,Gi.A)(t,{useSticky:Ms,debug:false,safeMode:false,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()});const n=t.tracer;n("initCharCodeToOptimizedIndexMap",(()=>{ya()}));let r;n("Reject Lexer.NA",(()=>{r=zi(e,(e=>e[_s]===Ga.NA))}));let i=false;let s;n("Transform Patterns",(()=>{i=false;s=(0,ir.A)(r,(e=>{const n=e[_s];if(Fr(n)){const e=n.source;if(e.length===1&&e!=="^"&&e!=="$"&&e!=="."&&!n.ignoreCase){return e}else if(e.length===2&&e[0]==="\\"&&!hi(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])){return e[1]}else{return t.useSticky?ra(n):na(n)}}else if((0,qi.A)(n)){i=true;return{exec:n}}else if(typeof n==="object"){i=true;return n}else if(typeof n==="string"){if(n.length===1){return n}else{const e=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&");const r=new RegExp(e);return t.useSticky?ra(r):na(r)}}else{throw Error("non exhaustive match")}}))}));let a;let o;let c;let u;let l;n("misc mapping",(()=>{a=(0,ir.A)(r,(e=>e.tokenTypeIdx));o=(0,ir.A)(r,(e=>{const t=e.GROUP;if(t===Ga.SKIPPED){return undefined}else if((0,hr.A)(t)){return t}else if((0,Fi.A)(t)){return false}else{throw Error("non exhaustive match")}}));c=(0,ir.A)(r,(e=>{const t=e.LONGER_ALT;if(t){const e=(0,ai.A)(t)?(0,ir.A)(t,(e=>Qi(r,e))):[Qi(r,t)];return e}}));u=(0,ir.A)(r,(e=>e.PUSH_MODE));l=(0,ir.A)(r,(e=>(0,sr.A)(e,"POP_MODE")))}));let f;n("Line Terminator Handling",(()=>{const e=da(t.lineTerminatorCharacters);f=(0,ir.A)(r,(e=>false));if(t.positionTracking!=="onlyOffset"){f=(0,ir.A)(r,(t=>{if((0,sr.A)(t,"LINE_BREAKS")){return!!t.LINE_BREAKS}else{return la(t,e)===false&&bs(e,t.PATTERN)}}))}}));let d;let h;let p;let m;n("Misc Mapping #2",(()=>{d=(0,ir.A)(r,oa);h=(0,ir.A)(s,ca);p=(0,Ji.A)(r,((e,t)=>{const n=t.GROUP;if((0,hr.A)(n)&&!(n===Ga.SKIPPED)){e[n]=[]}return e}),{});m=(0,ir.A)(s,((e,t)=>({pattern:s[t],longerAlt:c[t],canLineTerminator:f[t],isCustom:d[t],short:h[t],group:o[t],push:u[t],pop:l[t],tokenTypeIdx:a[t],tokenType:r[t]})))}));let g=true;let y=[];if(!t.safeMode){n("First Char Optimization",(()=>{y=(0,Ji.A)(r,((e,n,r)=>{if(typeof n.PATTERN==="string"){const t=n.PATTERN.charCodeAt(0);const i=ga(t);ha(e,i,m[r])}else if((0,ai.A)(n.START_CHARS_HINT)){let t;(0,tr.A)(n.START_CHARS_HINT,(n=>{const i=typeof n==="string"?n.charCodeAt(0):n;const s=ga(i);if(t!==s){t=s;ha(e,s,m[r])}}))}else if(Fr(n.PATTERN)){if(n.PATTERN.unicode){g=false;if(t.ensureOptimizations){ys(`${xs}`+`\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n`+"\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n"+"\tThis will disable the lexer's first char optimizations.\n"+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE")}}else{const i=Is(n.PATTERN,t.ensureOptimizations);if((0,rr.A)(i)){g=false}(0,tr.A)(i,(t=>{ha(e,t,m[r])}))}}else{if(t.ensureOptimizations){ys(`${xs}`+`\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n`+"\tThis will disable the lexer's first char optimizations.\n"+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE")}g=false}return e}),[])}))}return{emptyGroups:p,patternIdxToConfig:m,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:g}}function Gs(e,t){let n=[];const r=Ks(e);n=n.concat(r.errors);const i=js(r.valid);const s=i.valid;n=n.concat(i.errors);n=n.concat(Bs(s));n=n.concat(Qs(s));n=n.concat(Js(s,t));n=n.concat(Zs(s));return n}function Bs(e){let t=[];const n=(0,Zi.A)(e,(e=>Fr(e[_s])));t=t.concat(Ws(n));t=t.concat(qs(n));t=t.concat(Ys(n));t=t.concat(Xs(n));t=t.concat(Hs(n));return t}function Ks(e){const t=(0,Zi.A)(e,(e=>!(0,sr.A)(e,_s)));const n=(0,ir.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:Ua.MISSING_PATTERN,tokenTypes:[e]})));const r=fs(e,t);return{errors:n,valid:r}}function js(e){const t=(0,Zi.A)(e,(e=>{const t=e[_s];return!Fr(t)&&!(0,qi.A)(t)&&!(0,sr.A)(t,"exec")&&!(0,hr.A)(t)}));const n=(0,ir.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a"+" Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Ua.INVALID_PATTERN,tokenTypes:[e]})));const r=fs(e,t);return{errors:n,valid:r}}const Vs=/[^\\][$]/;function Ws(e){class t extends sn{constructor(){super(...arguments);this.found=false}visitEndAnchor(e){this.found=true}}const n=(0,Zi.A)(e,(e=>{const n=e.PATTERN;try{const e=Es(n);const r=new t;r.visit(e);return r.found}catch(r){return Vs.test(n.source)}}));const r=(0,ir.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n"+"\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n"+"\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS"+"\tfor details.",type:Ua.EOI_ANCHOR_FOUND,tokenTypes:[e]})));return r}function Hs(e){const t=(0,Zi.A)(e,(e=>{const t=e.PATTERN;return t.test("")}));const n=(0,ir.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:Ua.EMPTY_MATCH_PATTERN,tokenTypes:[e]})));return n}const zs=/[^\\[][\^]|^\^/;function qs(e){class t extends sn{constructor(){super(...arguments);this.found=false}visitStartAnchor(e){this.found=true}}const n=(0,Zi.A)(e,(e=>{const n=e.PATTERN;try{const e=Es(n);const r=new t;r.visit(e);return r.found}catch(r){return zs.test(n.source)}}));const r=(0,ir.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n"+"\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n"+"\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS"+"\tfor details.",type:Ua.SOI_ANCHOR_FOUND,tokenTypes:[e]})));return r}function Ys(e){const t=(0,Zi.A)(e,(e=>{const t=e[_s];return t instanceof RegExp&&(t.multiline||t.global)}));const n=(0,ir.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Ua.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]})));return n}function Xs(e){const t=[];let n=(0,ir.A)(e,(n=>(0,Ji.A)(e,((e,r)=>{if(n.PATTERN.source===r.PATTERN.source&&!hi(t,r)&&r.PATTERN!==Ga.NA){t.push(r);e.push(r);return e}return e}),[])));n=hs(n);const r=(0,Zi.A)(n,(e=>e.length>1));const i=(0,ir.A)(r,(e=>{const t=(0,ir.A)(e,(e=>e.name));const n=ms(e).PATTERN;return{message:`The same RegExp pattern ->${n}<-`+`has been used in all of the following Token Types: ${t.join(", ")} <-`,type:Ua.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}));return i}function Qs(e){const t=(0,Zi.A)(e,(e=>{if(!(0,sr.A)(e,"GROUP")){return false}const t=e.GROUP;return t!==Ga.SKIPPED&&t!==Ga.NA&&!(0,hr.A)(t)}));const n=(0,ir.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Ua.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]})));return n}function Js(e,t){const n=(0,Zi.A)(e,(e=>e.PUSH_MODE!==undefined&&!hi(t,e.PUSH_MODE)));const r=(0,ir.A)(n,(e=>{const t=`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-`+`which does not exist`;return{message:t,type:Ua.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}));return r}function Zs(e){const t=[];const n=(0,Ji.A)(e,((e,t,n)=>{const r=t.PATTERN;if(r===Ga.NA){return e}if((0,hr.A)(r)){e.push({str:r,idx:n,tokenType:t})}else if(Fr(r)&&ta(r)){e.push({str:r.source,idx:n,tokenType:t})}return e}),[]);(0,tr.A)(e,((e,r)=>{(0,tr.A)(n,(({str:n,idx:i,tokenType:s})=>{if(r<i&&ea(n,e.PATTERN)){const n=`Token: ->${s.name}<- can never be matched.\n`+`Because it appears AFTER the Token Type ->${e.name}<-`+`in the lexer's definition.\n`+`See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:Ua.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}}))}));return t}function ea(e,t){if(Fr(t)){const n=t.exec(e);return n!==null&&n.index===0}else if((0,qi.A)(t)){return t(e,0,[],{})}else if((0,sr.A)(t,"exec")){return t.exec(e,0,[],{})}else if(typeof t==="string"){return t===e}else{throw Error("non exhaustive match")}}function ta(e){const t=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,gs.A)(t,(t=>e.source.indexOf(t)!==-1))===undefined}function na(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function ra(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function ia(e,t,n){const r=[];if(!(0,sr.A)(e,Os)){r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Os+"> property in its definition\n",type:Ua.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE})}if(!(0,sr.A)(e,Ps)){r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ps+"> property in its definition\n",type:Ua.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY})}if((0,sr.A)(e,Ps)&&(0,sr.A)(e,Os)&&!(0,sr.A)(e.modes,e.defaultMode)){r.push({message:`A MultiMode Lexer cannot be initialized with a ${Os}: <${e.defaultMode}>`+`which does not exist\n`,type:Ua.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST})}if((0,sr.A)(e,Ps)){(0,tr.A)(e.modes,((e,t)=>{(0,tr.A)(e,((n,i)=>{if((0,Fi.A)(n)){r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:`+`<${t}> at index: <${i}>\n`,type:Ua.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}else if((0,sr.A)(n,"LONGER_ALT")){const i=(0,ai.A)(n.LONGER_ALT)?n.LONGER_ALT:[n.LONGER_ALT];(0,tr.A)(i,(i=>{if(!(0,Fi.A)(i)&&!hi(e,i)){r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${n.name}> outside of mode <${t}>\n`,type:Ua.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}}))}}))}))}return r}function sa(e,t,n){const r=[];let i=false;const s=hs((0,Ci.A)((0,nr.A)(e.modes)));const a=zi(s,(e=>e[_s]===Ga.NA));const o=da(n);if(t){(0,tr.A)(a,(e=>{const t=la(e,o);if(t!==false){const n=fa(e,t);const i={message:n,type:t.issue,tokenType:e};r.push(i)}else{if((0,sr.A)(e,"LINE_BREAKS")){if(e.LINE_BREAKS===true){i=true}}else{if(bs(o,e.PATTERN)){i=true}}}}))}if(t&&!i){r.push({message:"Warning: No LINE_BREAKS Found.\n"+"\tThis Lexer has been defined to track line and column information,\n"+"\tBut none of the Token Types can be identified as matching a line terminator.\n"+"\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n"+"\tfor details.",type:Ua.NO_LINE_BREAKS_FLAGS})}return r}function aa(e){const t={};const n=(0,Tr.A)(e);(0,tr.A)(n,(n=>{const r=e[n];if((0,ai.A)(r)){t[n]=[]}else{throw Error("non exhaustive match")}}));return t}function oa(e){const t=e.PATTERN;if(Fr(t)){return false}else if((0,qi.A)(t)){return true}else if((0,sr.A)(t,"exec")){return true}else if((0,hr.A)(t)){return false}else{throw Error("non exhaustive match")}}function ca(e){if((0,hr.A)(e)&&e.length===1){return e.charCodeAt(0)}else{return false}}const ua={test:function(e){const t=e.length;for(let n=this.lastIndex;n<t;n++){const t=e.charCodeAt(n);if(t===10){this.lastIndex=n+1;return true}else if(t===13){if(e.charCodeAt(n+1)===10){this.lastIndex=n+2}else{this.lastIndex=n+1}return true}}return false},lastIndex:0};function la(e,t){if((0,sr.A)(e,"LINE_BREAKS")){return false}else{if(Fr(e.PATTERN)){try{bs(t,e.PATTERN)}catch(n){return{issue:Ua.IDENTIFY_TERMINATOR,errMsg:n.message}}return false}else if((0,hr.A)(e.PATTERN)){return false}else if(oa(e)){return{issue:Ua.CUSTOM_LINE_BREAK}}else{throw Error("non exhaustive match")}}}function fa(e,t){if(t.issue===Ua.IDENTIFY_TERMINATOR){return"Warning: unable to identify line terminator usage in pattern.\n"+`\tThe problem is in the <${e.name}> Token Type\n`+`\t Root cause: ${t.errMsg}.\n`+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR"}else if(t.issue===Ua.CUSTOM_LINE_BREAK){return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n"+`\tThe problem is in the <${e.name}> Token Type\n`+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK"}else{throw Error("non exhaustive match")}}function da(e){const t=(0,ir.A)(e,(e=>{if((0,hr.A)(e)){return e.charCodeAt(0)}else{return e}}));return t}function ha(e,t,n){if(e[t]===undefined){e[t]=[n]}else{e[t].push(n)}}const pa=256;let ma=[];function ga(e){return e<pa?e:ma[e]}function ya(){if((0,rr.A)(ma)){ma=new Array(65536);for(let e=0;e<65536;e++){ma[e]=e>255?255+~~(e/255):e}}}var Aa=n(63077);var Ta=n(42111);var va=n(80359);function Ea(e){const t=(new Date).getTime();const n=e();const r=(new Date).getTime();const i=r-t;return{time:i,value:n}}function Ra(e,t){const n=e.tokenTypeIdx;if(n===t.tokenTypeIdx){return true}else{return t.isParent===true&&t.categoryMatchesMap[n]===true}}function ka(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}let xa=1;const Ia={};function Sa(e){const t=wa(e);Na(t);$a(t);Ca(t);(0,tr.A)(t,(e=>{e.isParent=e.categoryMatches.length>0}))}function wa(e){let t=(0,ar.A)(e);let n=e;let r=true;while(r){n=hs((0,Ci.A)((0,ir.A)(n,(e=>e.CATEGORIES))));const e=fs(n,t);t=t.concat(e);if((0,rr.A)(e)){r=false}else{n=e}}return t}function Na(e){(0,tr.A)(e,(e=>{if(!ba(e)){Ia[xa]=e;e.tokenTypeIdx=xa++}if(_a(e)&&!(0,ai.A)(e.CATEGORIES)){e.CATEGORIES=[e.CATEGORIES]}if(!_a(e)){e.CATEGORIES=[]}if(!Oa(e)){e.categoryMatches=[]}if(!Pa(e)){e.categoryMatchesMap={}}}))}function Ca(e){(0,tr.A)(e,(e=>{e.categoryMatches=[];(0,tr.A)(e.categoryMatchesMap,((t,n)=>{e.categoryMatches.push(Ia[n].tokenTypeIdx)}))}))}function $a(e){(0,tr.A)(e,(e=>{La([],e)}))}function La(e,t){(0,tr.A)(e,(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=true}));(0,tr.A)(t.CATEGORIES,(n=>{const r=e.concat(t);if(!hi(r,n)){La(r,n)}}))}function ba(e){return(0,sr.A)(e,"tokenTypeIdx")}function _a(e){return(0,sr.A)(e,"CATEGORIES")}function Oa(e){return(0,sr.A)(e,"categoryMatches")}function Pa(e){return(0,sr.A)(e,"categoryMatchesMap")}function Ma(e){return(0,sr.A)(e,"tokenTypeIdx")}const Da={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,n,r,i){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t},`+` skipped ${n} characters.`}};var Ua;(function(e){e[e["MISSING_PATTERN"]=0]="MISSING_PATTERN";e[e["INVALID_PATTERN"]=1]="INVALID_PATTERN";e[e["EOI_ANCHOR_FOUND"]=2]="EOI_ANCHOR_FOUND";e[e["UNSUPPORTED_FLAGS_FOUND"]=3]="UNSUPPORTED_FLAGS_FOUND";e[e["DUPLICATE_PATTERNS_FOUND"]=4]="DUPLICATE_PATTERNS_FOUND";e[e["INVALID_GROUP_TYPE_FOUND"]=5]="INVALID_GROUP_TYPE_FOUND";e[e["PUSH_MODE_DOES_NOT_EXIST"]=6]="PUSH_MODE_DOES_NOT_EXIST";e[e["MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE"]=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE";e[e["MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY"]=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY";e[e["MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST"]=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST";e[e["LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED"]=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED";e[e["SOI_ANCHOR_FOUND"]=11]="SOI_ANCHOR_FOUND";e[e["EMPTY_MATCH_PATTERN"]=12]="EMPTY_MATCH_PATTERN";e[e["NO_LINE_BREAKS_FLAGS"]=13]="NO_LINE_BREAKS_FLAGS";e[e["UNREACHABLE_PATTERN"]=14]="UNREACHABLE_PATTERN";e[e["IDENTIFY_TERMINATOR"]=15]="IDENTIFY_TERMINATOR";e[e["CUSTOM_LINE_BREAK"]=16]="CUSTOM_LINE_BREAK";e[e["MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"]=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Ua||(Ua={}));const Fa={deferDefinitionErrorsHandling:false,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:false,safeMode:false,errorMessageProvider:Da,traceInitPerf:false,skipValidations:false,recoveryEnabled:true};Object.freeze(Fa);class Ga{constructor(e,t=Fa){this.lexerDefinition=e;this.lexerDefinitionErrors=[];this.lexerDefinitionWarning=[];this.patternIdxToConfig={};this.charCodeToPatternIdxToConfig={};this.modes=[];this.emptyGroups={};this.trackStartLines=true;this.trackEndLines=true;this.hasCustom=false;this.canModeBeOptimized={};this.TRACE_INIT=(e,t)=>{if(this.traceInitPerf===true){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");if(this.traceInitIndent<this.traceInitMaxIdent){console.log(`${n}--\x3e <${e}>`)}const{time:r,value:i}=Ea(t);const s=r>10?console.warn:console.log;if(this.traceInitIndent<this.traceInitMaxIdent){s(`${n}<-- <${e}> time: ${r}ms`)}this.traceInitIndent--;return i}else{return t()}};if(typeof t==="boolean"){throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\n"+"a boolean 2nd argument is no longer supported")}this.config=kr({},Fa,t);const n=this.config.traceInitPerf;if(n===true){this.traceInitMaxIdent=Infinity;this.traceInitPerf=true}else if(typeof n==="number"){this.traceInitMaxIdent=n;this.traceInitPerf=true}this.traceInitIndent=-1;this.TRACE_INIT("Lexer Constructor",(()=>{let n;let r=true;this.TRACE_INIT("Lexer Config handling",(()=>{if(this.config.lineTerminatorsPattern===Fa.lineTerminatorsPattern){this.config.lineTerminatorsPattern=ua}else{if(this.config.lineTerminatorCharacters===Fa.lineTerminatorCharacters){throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n"+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS")}}if(t.safeMode&&t.ensureOptimizations){throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.')}this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking);this.trackEndLines=/full/i.test(this.config.positionTracking);if((0,ai.A)(e)){n={modes:{defaultMode:(0,ar.A)(e)},defaultMode:Os}}else{r=false;n=(0,ar.A)(e)}}));if(this.config.skipValidations===false){this.TRACE_INIT("performRuntimeChecks",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ia(n,this.trackStartLines,this.config.lineTerminatorCharacters))}));this.TRACE_INIT("performWarningRuntimeChecks",(()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(sa(n,this.trackStartLines,this.config.lineTerminatorCharacters))}))}n.modes=n.modes?n.modes:{};(0,tr.A)(n.modes,((e,t)=>{n.modes[t]=zi(e,(e=>(0,Fi.A)(e)))}));const i=(0,Tr.A)(n.modes);(0,tr.A)(n.modes,((e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,(()=>{this.modes.push(n);if(this.config.skipValidations===false){this.TRACE_INIT(`validatePatterns`,(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Gs(e,i))}))}if((0,rr.A)(this.lexerDefinitionErrors)){Sa(e);let r;this.TRACE_INIT(`analyzeTokenTypes`,(()=>{r=Fs(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}));this.patternIdxToConfig[n]=r.patternIdxToConfig;this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig;this.emptyGroups=kr({},this.emptyGroups,r.emptyGroups);this.hasCustom=r.hasCustom||this.hasCustom;this.canModeBeOptimized[n]=r.canBeOptimized}}))}));this.defaultMode=n.defaultMode;if(!(0,rr.A)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=(0,ir.A)(this.lexerDefinitionErrors,(e=>e.message));const t=e.join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+t)}(0,tr.A)(this.lexerDefinitionWarning,(e=>{As(e.message)}));this.TRACE_INIT("Choosing sub-methods implementations",(()=>{if(Ms){this.chopInput=Aa.A;this.match=this.matchWithTest}else{this.updateLastIndex=Ta.A;this.match=this.matchWithExec}if(r){this.handleModes=Ta.A}if(this.trackStartLines===false){this.computeNewColumn=Aa.A}if(this.trackEndLines===false){this.updateTokenEndLineColumnLocation=Ta.A}if(/full/i.test(this.config.positionTracking)){this.createTokenInstance=this.createFullToken}else if(/onlyStart/i.test(this.config.positionTracking)){this.createTokenInstance=this.createStartOnlyToken}else if(/onlyOffset/i.test(this.config.positionTracking)){this.createTokenInstance=this.createOffsetOnlyToken}else{throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`)}if(this.hasCustom){this.addToken=this.addTokenUsingPush;this.handlePayload=this.handlePayloadWithCustom}else{this.addToken=this.addTokenUsingMemberAccess;this.handlePayload=this.handlePayloadNoCustom}}));this.TRACE_INIT("Failed Optimization Warnings",(()=>{const e=(0,Ji.A)(this.canModeBeOptimized,((e,t,n)=>{if(t===false){e.push(n)}return e}),[]);if(t.ensureOptimizations&&!(0,rr.A)(e)){throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n`+'\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n'+"\t Or inspect the console log for details on how to resolve these issues.")}}));this.TRACE_INIT("clearRegExpParserCache",(()=>{Rs()}));this.TRACE_INIT("toFastProperties",(()=>{or(this)}))}))}tokenize(e,t=this.defaultMode){if(!(0,rr.A)(this.lexerDefinitionErrors)){const e=(0,ir.A)(this.lexerDefinitionErrors,(e=>e.message));const t=e.join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+t)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,s,a,o,c,u,l,f,d,h,p,m,g,y;const A=e;const T=A.length;let v=0;let E=0;const R=this.hasCustom?0:Math.floor(e.length/10);const k=new Array(R);const x=[];let I=this.trackStartLines?1:undefined;let S=this.trackStartLines?1:undefined;const w=aa(this.emptyGroups);const N=this.trackStartLines;const C=this.config.lineTerminatorsPattern;let $=0;let L=[];let b=[];const _=[];const O=[];Object.freeze(O);let P;function M(){return L}function D(e){const t=ga(e);const n=b[t];if(n===undefined){return O}else{return n}}const U=e=>{if(_.length===1&&e.tokenType.PUSH_MODE===undefined){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);x.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{_.pop();const e=(0,va.A)(_);L=this.patternIdxToConfig[e];b=this.charCodeToPatternIdxToConfig[e];$=L.length;const t=this.canModeBeOptimized[e]&&this.config.safeMode===false;if(b&&t){P=D}else{P=M}}};function F(e){_.push(e);b=this.charCodeToPatternIdxToConfig[e];L=this.patternIdxToConfig[e];$=L.length;$=L.length;const t=this.canModeBeOptimized[e]&&this.config.safeMode===false;if(b&&t){P=D}else{P=M}}F.call(this,t);let G;const B=this.config.recoveryEnabled;while(v<T){o=null;const t=A.charCodeAt(v);const m=P(t);const R=m.length;for(n=0;n<R;n++){G=m[n];const r=G.pattern;c=null;const l=G.short;if(l!==false){if(t===l){o=r}}else if(G.isCustom===true){y=r.exec(A,v,k,w);if(y!==null){o=y[0];if(y.payload!==undefined){c=y.payload}}else{o=null}}else{this.updateLastIndex(r,v);o=this.match(r,e,v)}if(o!==null){a=G.longerAlt;if(a!==undefined){const t=a.length;for(i=0;i<t;i++){const t=L[a[i]];const n=t.pattern;u=null;if(t.isCustom===true){y=n.exec(A,v,k,w);if(y!==null){s=y[0];if(y.payload!==undefined){u=y.payload}}else{s=null}}else{this.updateLastIndex(n,v);s=this.match(n,e,v)}if(s&&s.length>o.length){o=s;c=u;G=t;break}}}break}}if(o!==null){l=o.length;f=G.group;if(f!==undefined){d=G.tokenTypeIdx;h=this.createTokenInstance(o,v,d,G.tokenType,I,S,l);this.handlePayload(h,c);if(f===false){E=this.addToken(k,E,h)}else{w[f].push(h)}}e=this.chopInput(e,l);v=v+l;S=this.computeNewColumn(S,l);if(N===true&&G.canLineTerminator===true){let e=0;let t;let n;C.lastIndex=0;do{t=C.test(o);if(t===true){n=C.lastIndex-1;e++}}while(t===true);if(e!==0){I=I+e;S=l-n;this.updateTokenEndLineColumnLocation(h,f,n,e,I,S,l)}}this.handleModes(G,U,F,h)}else{const t=v;const n=I;const i=S;let s=B===false;while(s===false&&v<T){e=this.chopInput(e,1);v++;for(r=0;r<$;r++){const t=L[r];const n=t.pattern;const i=t.short;if(i!==false){if(A.charCodeAt(v)===i){s=true}}else if(t.isCustom===true){s=n.exec(A,v,k,w)!==null}else{this.updateLastIndex(n,v);s=n.exec(e)!==null}if(s===true){break}}}p=v-t;S=this.computeNewColumn(S,p);g=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(A,t,p,n,i);x.push({offset:t,line:n,column:i,length:p,message:g});if(B===false){break}}}if(!this.hasCustom){k.length=E}return{tokens:k,groups:w,errors:x}}handleModes(e,t,n,r){if(e.pop===true){const i=e.push;t(r);if(i!==undefined){n.call(this,i)}}else if(e.push!==undefined){n.call(this,e.push)}}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,n,r,i,s,a){let o,c;if(t!==undefined){o=n===a-1;c=o?-1:0;if(!(r===1&&o===true)){e.endLine=i+c;e.endColumn=s-1+-c}}}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,i,s){return{image:e,startOffset:t,startLine:i,startColumn:s,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,i,s,a){return{image:e,startOffset:t,endOffset:t+a-1,startLine:i,endLine:i,startColumn:s,endColumn:s+a-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){e.push(n);return t}addTokenUsingMemberAccess(e,t,n){e[t]=n;t++;return t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){if(t!==null){e.payload=t}}matchWithTest(e,t,n){const r=e.test(t);if(r===true){return t.substring(n,e.lastIndex)}return null}matchWithExec(e,t){const n=e.exec(t);return n!==null?n[0]:null}}Ga.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will"+"be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";Ga.NA=/NOT_APPLICABLE/;function Ba(e){if(ja(e)){return e.LABEL}else{return e.name}}function Ka(e){return e.name}function ja(e){return(0,hr.A)(e.LABEL)&&e.LABEL!==""}const Va="parent";const Wa="categories";const Ha="label";const za="group";const qa="push_mode";const Ya="pop_mode";const Xa="longer_alt";const Qa="line_breaks";const Ja="start_chars_hint";function Za(e){return eo(e)}function eo(e){const t=e.pattern;const n={};n.name=e.name;if(!(0,Fi.A)(t)){n.PATTERN=t}if((0,sr.A)(e,Va)){throw"The parent property is no longer supported.\n"+"See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details."}if((0,sr.A)(e,Wa)){n.CATEGORIES=e[Wa]}Sa([n]);if((0,sr.A)(e,Ha)){n.LABEL=e[Ha]}if((0,sr.A)(e,za)){n.GROUP=e[za]}if((0,sr.A)(e,Ya)){n.POP_MODE=e[Ya]}if((0,sr.A)(e,qa)){n.PUSH_MODE=e[qa]}if((0,sr.A)(e,Xa)){n.LONGER_ALT=e[Xa]}if((0,sr.A)(e,Qa)){n.LINE_BREAKS=e[Qa]}if((0,sr.A)(e,Ja)){n.START_CHARS_HINT=e[Ja]}return n}const to=Za({name:"EOF",pattern:Ga.NA});Sa([to]);function no(e,t,n,r,i,s,a,o){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:a,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function ro(e,t){return Ra(e,t)}const io={buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:r}){const i=ja(e);const s=i?`--\x3e ${Ba(e)} <--`:`token of type --\x3e ${e.name} <--`;const a=`Expecting ${s} but found --\x3e '${t.image}' <--`;return a},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ";const a=ms(t).image;const o="\nbut found: '"+a+"'";if(r){return s+r+o}else{const t=(0,Ji.A)(e,((e,t)=>e.concat(t)),[]);const n=(0,ir.A)(t,(e=>`[${(0,ir.A)(e,(e=>Ba(e))).join(", ")}]`));const r=(0,ir.A)(n,((e,t)=>` ${t+1}. ${e}`));const i=`one of these possible Token sequences:\n${r.join("\n")}`;return s+i+o}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){const i="Expecting: ";const s=ms(t).image;const a="\nbut found: '"+s+"'";if(n){return i+n+a}else{const t=(0,ir.A)(e,(e=>`[${(0,ir.A)(e,(e=>Ba(e))).join(",")}]`));const n=`expecting at least one iteration which starts with one of these possible Token sequences::\n `+`<${t.join(" ,")}>`;return i+n+a}}};Object.freeze(io);const so={buildRuleNotFoundError(e,t){const n="Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\n"+"inside top level rule: ->"+e.name+"<-";return n}};const ao={buildDuplicateFoundError(e,t){function n(e){if(e instanceof Jr){return e.terminalType.name}else if(e instanceof jr){return e.nonTerminalName}else{return""}}const r=e.name;const i=ms(t);const s=i.idx;const a=ki(i);const o=n(i);const c=s>0;let u=`->${a}${c?s:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${r}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;u=u.replace(/[ \t]+/g," ");u=u.replace(/\s\s+/g,"\n");return u},buildNamespaceConflictError(e){const t=`Namespace conflict found in grammar.\n`+`The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\n`+`To resolve this make sure each Terminal and Non-Terminal names are unique\n`+`This is easy to accomplish by using the convention that Terminal names start with an uppercase letter\n`+`and Non-Terminal names start with a lower case letter.`;return t},buildAlternationPrefixAmbiguityError(e){const t=(0,ir.A)(e.prefixPath,(e=>Ba(e))).join(", ");const n=e.alternation.idx===0?"":e.alternation.idx;const r=`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\n`+`in <OR${n}> inside <${e.topLevelRule.name}> Rule,\n`+`<${t}> may appears as a prefix path in all these alternatives.\n`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\n`+`For Further details.`;return r},buildAlternationAmbiguityError(e){const t=(0,ir.A)(e.prefixPath,(e=>Ba(e))).join(", ");const n=e.alternation.idx===0?"":e.alternation.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${n}>`+` inside <${e.topLevelRule.name}> Rule,\n`+`<${t}> may appears as a prefix path in all these alternatives.\n`;r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\n`+`For Further details.`;return r},buildEmptyRepetitionError(e){let t=ki(e.repetition);if(e.repetition.idx!==0){t+=e.repetition.idx}const n=`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\n`+`This could lead to an infinite loop.`;return n},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){const t=`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}>`+` in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n`+`Only the last alternative may be an empty alternative.`;return t},buildTooManyAlternativesError(e){const t=`An Alternation cannot have more than 256 alternatives:\n`+`<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`;return t},buildLeftRecursionError(e){const t=e.topLevelRule.name;const n=(0,ir.A)(e.leftRecursionPath,(e=>e.name));const r=`${t} --\x3e ${n.concat([t]).join(" --\x3e ")}`;const i=`Left Recursion found in grammar.\n`+`rule: <${t}> can be invoked from itself (directly or indirectly)\n`+`without consuming any Tokens. The grammar path that causes this is: \n ${r}\n`+` To fix this refactor your grammar to remove the left recursion.\n`+`see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`;return i},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;if(e.topLevelRule instanceof Vr){t=e.topLevelRule.name}else{t=e.topLevelRule}const n=`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`;return n}};function oo(e,t){const n=new co(e,t);n.resolveRefs();return n.errors}class co extends ti{constructor(e,t){super();this.nameToTopRule=e;this.errMsgProvider=t;this.errors=[]}resolveRefs(){(0,tr.A)((0,nr.A)(this.nameToTopRule),(e=>{this.currTopLevel=e;e.accept(this)}))}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(!t){const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Ou.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}else{e.referencedRule=t}}}function uo(e,t){return(0,os.A)((0,ir.A)(e,t),1)}const lo=uo;var fo=n(48657);function ho(e,t,n,r){var i=-1,s=e==null?0:e.length;while(++i<s){var a=e[i];t(r,a,n(a),e)}return r}const po=ho;function mo(e,t,n,r){(0,ri.A)(e,(function(e,i,s){t(r,e,n(e),s)}));return r}const go=mo;function yo(e,t){return function(n,r){var i=(0,ai.A)(n)?po:go,s=t?t():{};return i(n,e,(0,Ir.A)(r,2),s)}}const Ao=yo;var To=Object.prototype;var vo=To.hasOwnProperty;var Eo=Ao((function(e,t,n){if(vo.call(e,n)){e[n].push(t)}else{(0,fo.A)(e,n,[t])}}));const Ro=Eo;function ko(e,t,n){var r=e==null?0:e.length;if(!r){return[]}t=n||t===undefined?1:(0,lr.A)(t);t=r-t;return ur(e,0,t<0?0:t)}const xo=ko;class Io extends xi{constructor(e,t){super();this.topProd=e;this.path=t;this.possibleTokTypes=[];this.nextProductionName="";this.nextProductionOccurrence=0;this.found=false;this.isAtEndOfPath=false}startWalking(){this.found=false;if(this.path.ruleStack[0]!==this.topProd.name){throw Error("The path does not start with the walker's top Rule!")}this.ruleStack=(0,ar.A)(this.path.ruleStack).reverse();this.occurrenceStack=(0,ar.A)(this.path.occurrenceStack).reverse();this.ruleStack.pop();this.occurrenceStack.pop();this.updateExpectedNext();this.walk(this.topProd);return this.possibleTokTypes}walk(e,t=[]){if(!this.found){super.walk(e,t)}}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const r=t.concat(n);this.updateExpectedNext();this.walk(e.referencedRule,r)}}updateExpectedNext(){if((0,rr.A)(this.ruleStack)){this.nextProductionName="";this.nextProductionOccurrence=0;this.isAtEndOfPath=true}else{this.nextProductionName=this.ruleStack.pop();this.nextProductionOccurrence=this.occurrenceStack.pop()}}}class So extends Io{constructor(e,t){super(e,t);this.path=t;this.nextTerminalName="";this.nextTerminalOccurrence=0;this.nextTerminalName=this.path.lastTok.name;this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const e=t.concat(n);const r=new Wr({definition:e});this.possibleTokTypes=$i(r);this.found=true}}}class wo extends xi{constructor(e,t){super();this.topRule=e;this.occurrence=t;this.result={token:undefined,occurrence:undefined,isEndOfRule:undefined}}startWalking(){this.walk(this.topRule);return this.result}}class No extends wo{walkMany(e,t,n){if(e.idx===this.occurrence){const e=ms(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof Jr){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkMany(e,t,n)}}}class Co extends wo{walkManySep(e,t,n){if(e.idx===this.occurrence){const e=ms(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof Jr){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkManySep(e,t,n)}}}class $o extends wo{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){const e=ms(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof Jr){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkAtLeastOne(e,t,n)}}}class Lo extends wo{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){const e=ms(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof Jr){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkAtLeastOneSep(e,t,n)}}}function bo(e,t,n=[]){n=(0,ar.A)(n);let r=[];let i=0;function s(t){return t.concat(dr(e,i+1))}function a(e){const i=bo(s(e),t,n);return r.concat(i)}while(n.length<t&&i<e.length){const t=e[i];if(t instanceof Wr){return a(t.definition)}else if(t instanceof jr){return a(t.definition)}else if(t instanceof Hr){r=a(t.definition)}else if(t instanceof zr){const e=t.definition.concat([new Yr({definition:t.definition})]);return a(e)}else if(t instanceof qr){const e=[new Wr({definition:t.definition}),new Yr({definition:[new Jr({terminalType:t.separator})].concat(t.definition)})];return a(e)}else if(t instanceof Xr){const e=t.definition.concat([new Yr({definition:[new Jr({terminalType:t.separator})].concat(t.definition)})]);r=a(e)}else if(t instanceof Yr){const e=t.definition.concat([new Yr({definition:t.definition})]);r=a(e)}else if(t instanceof Qr){(0,tr.A)(t.definition,(e=>{if((0,rr.A)(e.definition)===false){r=a(e.definition)}}));return r}else if(t instanceof Jr){n.push(t.terminalType)}else{throw Error("non exhaustive match")}i++}r.push({partialPath:n,suffixDef:dr(e,i)});return r}function _o(e,t,n,r){const i="EXIT_NONE_TERMINAL";const s=[i];const a="EXIT_ALTERNATIVE";let o=false;const c=t.length;const u=c-r-1;const l=[];const f=[];f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});while(!(0,rr.A)(f)){const e=f.pop();if(e===a){if(o&&(0,va.A)(f).idx<=u){f.pop()}continue}const r=e.def;const d=e.idx;const h=e.ruleStack;const p=e.occurrenceStack;if((0,rr.A)(r)){continue}const m=r[0];if(m===i){const e={idx:d,def:dr(r),ruleStack:xo(h),occurrenceStack:xo(p)};f.push(e)}else if(m instanceof Jr){if(d<c-1){const e=d+1;const i=t[e];if(n(i,m.terminalType)){const t={idx:e,def:dr(r),ruleStack:h,occurrenceStack:p};f.push(t)}}else if(d===c-1){l.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:h,occurrenceStack:p});o=true}else{throw Error("non exhaustive match")}}else if(m instanceof jr){const e=(0,ar.A)(h);e.push(m.nonTerminalName);const t=(0,ar.A)(p);t.push(m.idx);const n={idx:d,def:m.definition.concat(s,dr(r)),ruleStack:e,occurrenceStack:t};f.push(n)}else if(m instanceof Hr){const e={idx:d,def:dr(r),ruleStack:h,occurrenceStack:p};f.push(e);f.push(a);const t={idx:d,def:m.definition.concat(dr(r)),ruleStack:h,occurrenceStack:p};f.push(t)}else if(m instanceof zr){const e=new Yr({definition:m.definition,idx:m.idx});const t=m.definition.concat([e],dr(r));const n={idx:d,def:t,ruleStack:h,occurrenceStack:p};f.push(n)}else if(m instanceof qr){const e=new Jr({terminalType:m.separator});const t=new Yr({definition:[e].concat(m.definition),idx:m.idx});const n=m.definition.concat([t],dr(r));const i={idx:d,def:n,ruleStack:h,occurrenceStack:p};f.push(i)}else if(m instanceof Xr){const e={idx:d,def:dr(r),ruleStack:h,occurrenceStack:p};f.push(e);f.push(a);const t=new Jr({terminalType:m.separator});const n=new Yr({definition:[t].concat(m.definition),idx:m.idx});const i=m.definition.concat([n],dr(r));const s={idx:d,def:i,ruleStack:h,occurrenceStack:p};f.push(s)}else if(m instanceof Yr){const e={idx:d,def:dr(r),ruleStack:h,occurrenceStack:p};f.push(e);f.push(a);const t=new Yr({definition:m.definition,idx:m.idx});const n=m.definition.concat([t],dr(r));const i={idx:d,def:n,ruleStack:h,occurrenceStack:p};f.push(i)}else if(m instanceof Qr){for(let e=m.definition.length-1;e>=0;e--){const t=m.definition[e];const n={idx:d,def:t.definition.concat(dr(r)),ruleStack:h,occurrenceStack:p};f.push(n);f.push(a)}}else if(m instanceof Wr){f.push({idx:d,def:m.definition.concat(dr(r)),ruleStack:h,occurrenceStack:p})}else if(m instanceof Vr){f.push(Oo(m,d,h,p))}else{throw Error("non exhaustive match")}}return l}function Oo(e,t,n,r){const i=(0,ar.A)(n);i.push(e.name);const s=(0,ar.A)(r);s.push(1);return{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var Po;(function(e){e[e["OPTION"]=0]="OPTION";e[e["REPETITION"]=1]="REPETITION";e[e["REPETITION_MANDATORY"]=2]="REPETITION_MANDATORY";e[e["REPETITION_MANDATORY_WITH_SEPARATOR"]=3]="REPETITION_MANDATORY_WITH_SEPARATOR";e[e["REPETITION_WITH_SEPARATOR"]=4]="REPETITION_WITH_SEPARATOR";e[e["ALTERNATION"]=5]="ALTERNATION"})(Po||(Po={}));function Mo(e){if(e instanceof Hr||e==="Option"){return Po.OPTION}else if(e instanceof Yr||e==="Repetition"){return Po.REPETITION}else if(e instanceof zr||e==="RepetitionMandatory"){return Po.REPETITION_MANDATORY}else if(e instanceof qr||e==="RepetitionMandatoryWithSeparator"){return Po.REPETITION_MANDATORY_WITH_SEPARATOR}else if(e instanceof Xr||e==="RepetitionWithSeparator"){return Po.REPETITION_WITH_SEPARATOR}else if(e instanceof Qr||e==="Alternation"){return Po.ALTERNATION}else{throw Error("non exhaustive match")}}function Do(e){const{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e;const s=Mo(r);if(s===Po.ALTERNATION){return qo(t,n,i)}else{return Yo(t,n,s,i)}}function Uo(e,t,n,r,i,s){const a=qo(e,t,n);const o=Jo(a)?ka:Ra;return s(a,r,o,i)}function Fo(e,t,n,r,i,s){const a=Yo(e,t,i,n);const o=Jo(a)?ka:Ra;return s(a[0],o,r)}function Go(e,t,n,r){const i=e.length;const s=Ti(e,(e=>Ti(e,(e=>e.length===1))));if(t){return function(t){const r=(0,ir.A)(t,(e=>e.GATE));for(let s=0;s<i;s++){const t=e[s];const i=t.length;const a=r[s];if(a!==undefined&&a.call(this)===false){continue}e:for(let e=0;e<i;e++){const r=t[e];const i=r.length;for(let e=0;e<i;e++){const t=this.LA(e+1);if(n(t,r[e])===false){continue e}}return s}}return undefined}}else if(s&&!r){const t=(0,ir.A)(e,(e=>(0,Ci.A)(e)));const n=(0,Ji.A)(t,((e,t,n)=>{(0,tr.A)(t,(t=>{if(!(0,sr.A)(e,t.tokenTypeIdx)){e[t.tokenTypeIdx]=n}(0,tr.A)(t.categoryMatches,(t=>{if(!(0,sr.A)(e,t)){e[t]=n}}))}));return e}),{});return function(){const e=this.LA(1);return n[e.tokenTypeIdx]}}else{return function(){for(let t=0;t<i;t++){const r=e[t];const i=r.length;e:for(let e=0;e<i;e++){const i=r[e];const s=i.length;for(let e=0;e<s;e++){const t=this.LA(e+1);if(n(t,i[e])===false){continue e}}return t}}return undefined}}}function Bo(e,t,n){const r=Ti(e,(e=>e.length===1));const i=e.length;if(r&&!n){const t=(0,Ci.A)(e);if(t.length===1&&(0,rr.A)(t[0].categoryMatches)){const e=t[0];const n=e.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===n}}else{const e=(0,Ji.A)(t,((e,t,n)=>{e[t.tokenTypeIdx]=true;(0,tr.A)(t.categoryMatches,(t=>{e[t]=true}));return e}),[]);return function(){const t=this.LA(1);return e[t.tokenTypeIdx]===true}}}else{return function(){e:for(let n=0;n<i;n++){const r=e[n];const i=r.length;for(let e=0;e<i;e++){const n=this.LA(e+1);if(t(n,r[e])===false){continue e}}return true}return false}}}class Ko extends xi{constructor(e,t,n){super();this.topProd=e;this.targetOccurrence=t;this.targetProdType=n}startWalking(){this.walk(this.topProd);return this.restDef}checkIsTarget(e,t,n,r){if(e.idx===this.targetOccurrence&&this.targetProdType===t){this.restDef=n.concat(r);return true}return false}walkOption(e,t,n){if(!this.checkIsTarget(e,Po.OPTION,t,n)){super.walkOption(e,t,n)}}walkAtLeastOne(e,t,n){if(!this.checkIsTarget(e,Po.REPETITION_MANDATORY,t,n)){super.walkOption(e,t,n)}}walkAtLeastOneSep(e,t,n){if(!this.checkIsTarget(e,Po.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)){super.walkOption(e,t,n)}}walkMany(e,t,n){if(!this.checkIsTarget(e,Po.REPETITION,t,n)){super.walkOption(e,t,n)}}walkManySep(e,t,n){if(!this.checkIsTarget(e,Po.REPETITION_WITH_SEPARATOR,t,n)){super.walkOption(e,t,n)}}}class jo extends ti{constructor(e,t,n){super();this.targetOccurrence=e;this.targetProdType=t;this.targetRef=n;this.result=[]}checkIsTarget(e,t){if(e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===undefined||e===this.targetRef)){this.result=e.definition}}visitOption(e){this.checkIsTarget(e,Po.OPTION)}visitRepetition(e){this.checkIsTarget(e,Po.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Po.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Po.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Po.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Po.ALTERNATION)}}function Vo(e){const t=new Array(e);for(let n=0;n<e;n++){t[n]=[]}return t}function Wo(e){let t=[""];for(let n=0;n<e.length;n++){const r=e[n];const i=[];for(let e=0;e<t.length;e++){const n=t[e];i.push(n+"_"+r.tokenTypeIdx);for(let e=0;e<r.categoryMatches.length;e++){const t="_"+r.categoryMatches[e];i.push(n+t)}}t=i}return t}function Ho(e,t,n){for(let r=0;r<e.length;r++){if(r===n){continue}const i=e[r];for(let e=0;e<t.length;e++){const n=t[e];if(i[n]===true){return false}}}return true}function zo(e,t){const n=(0,ir.A)(e,(e=>bo([e],1)));const r=Vo(n.length);const i=(0,ir.A)(n,(e=>{const t={};(0,tr.A)(e,(e=>{const n=Wo(e.partialPath);(0,tr.A)(n,(e=>{t[e]=true}))}));return t}));let s=n;for(let a=1;a<=t;a++){const e=s;s=Vo(e.length);for(let n=0;n<e.length;n++){const o=e[n];for(let e=0;e<o.length;e++){const c=o[e].partialPath;const u=o[e].suffixDef;const l=Wo(c);const f=Ho(i,l,n);if(f||(0,rr.A)(u)||c.length===t){const e=r[n];if(Xo(e,c)===false){e.push(c);for(let e=0;e<l.length;e++){const t=l[e];i[n][t]=true}}}else{const e=bo(u,a+1,c);s[n]=s[n].concat(e);(0,tr.A)(e,(e=>{const t=Wo(e.partialPath);(0,tr.A)(t,(e=>{i[n][e]=true}))}))}}}}return r}function qo(e,t,n,r){const i=new jo(e,Po.ALTERNATION,r);t.accept(i);return zo(i.result,n)}function Yo(e,t,n,r){const i=new jo(e,n);t.accept(i);const s=i.result;const a=new Ko(t,e,n);const o=a.startWalking();const c=new Wr({definition:s});const u=new Wr({definition:o});return zo([c,u],r)}function Xo(e,t){e:for(let n=0;n<e.length;n++){const r=e[n];if(r.length!==t.length){continue}for(let e=0;e<r.length;e++){const n=t[e];const i=r[e];const s=n===i||i.categoryMatchesMap[n.tokenTypeIdx]!==undefined;if(s===false){continue e}}return true}return false}function Qo(e,t){return e.length<t.length&&Ti(e,((e,n)=>{const r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]}))}function Jo(e){return Ti(e,(e=>Ti(e,(e=>Ti(e,(e=>(0,rr.A)(e.categoryMatches)))))))}function Zo(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return(0,ir.A)(t,(e=>Object.assign({type:Ou.CUSTOM_LOOKAHEAD_VALIDATION},e)))}function ec(e,t,n,r){const i=lo(e,(e=>tc(e,n)));const s=yc(e,t,n);const a=lo(e,(e=>hc(e,n)));const o=lo(e,(t=>sc(t,e,r,n)));return i.concat(s,a,o)}function tc(e,t){const n=new ic;e.accept(n);const r=n.allProductions;const i=Ro(r,nc);const s=Cr(i,(e=>e.length>1));const a=(0,ir.A)((0,nr.A)(s),(n=>{const r=ms(n);const i=t.buildDuplicateFoundError(e,n);const s=ki(r);const a={message:i,type:Ou.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:s,occurrence:r.idx};const o=rc(r);if(o){a.parameter=o}return a}));return a}function nc(e){return`${ki(e)}_#_${e.idx}_#_${rc(e)}`}function rc(e){if(e instanceof Jr){return e.terminalType.name}else if(e instanceof jr){return e.nonTerminalName}else{return""}}class ic extends ti{constructor(){super(...arguments);this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function sc(e,t,n,r){const i=[];const s=(0,Ji.A)(t,((t,n)=>{if(n.name===e.name){return t+1}return t}),0);if(s>1){const t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:Ou.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function ac(e,t,n){const r=[];let i;if(!hi(t,e)){i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-`+`as it is not defined in any of the super grammars `;r.push({message:i,type:Ou.INVALID_RULE_OVERRIDE,ruleName:e})}return r}function oc(e,t,n,r=[]){const i=[];const s=cc(t.definition);if((0,rr.A)(s)){return[]}else{const t=e.name;const a=hi(s,e);if(a){i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Ou.LEFT_RECURSION,ruleName:t})}const o=fs(s,r.concat([e]));const c=lo(o,(t=>{const i=(0,ar.A)(r);i.push(t);return oc(e,t,n,i)}));return i.concat(c)}}function cc(e){let t=[];if((0,rr.A)(e)){return t}const n=ms(e);if(n instanceof jr){t.push(n.referencedRule)}else if(n instanceof Wr||n instanceof Hr||n instanceof zr||n instanceof qr||n instanceof Xr||n instanceof Yr){t=t.concat(cc(n.definition))}else if(n instanceof Qr){t=(0,Ci.A)((0,ir.A)(n.definition,(e=>cc(e.definition))))}else if(n instanceof Jr){}else{throw Error("non exhaustive match")}const r=Ei(n);const i=e.length>1;if(r&&i){const n=dr(e);return t.concat(cc(n))}else{return t}}class uc extends ti{constructor(){super(...arguments);this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function lc(e,t){const n=new uc;e.accept(n);const r=n.alternations;const i=lo(r,(n=>{const r=xo(n.definition);return lo(r,((r,i)=>{const s=_o([r],[],Ra,1);if((0,rr.A)(s)){return[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:Ou.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]}else{return[]}}))}));return i}function fc(e,t,n){const r=new uc;e.accept(r);let i=r.alternations;i=zi(i,(e=>e.ignoreAmbiguities===true));const s=lo(i,(r=>{const i=r.idx;const s=r.maxLookahead||t;const a=qo(i,e,s,r);const o=mc(a,r,e,n);const c=gc(a,r,e,n);return o.concat(c)}));return s}class dc extends ti{constructor(){super(...arguments);this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function hc(e,t){const n=new uc;e.accept(n);const r=n.alternations;const i=lo(r,(n=>{if(n.definition.length>255){return[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Ou.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]}else{return[]}}));return i}function pc(e,t,n){const r=[];(0,tr.A)(e,(e=>{const i=new dc;e.accept(i);const s=i.allProductions;(0,tr.A)(s,(i=>{const s=Mo(i);const a=i.maxLookahead||t;const o=i.idx;const c=Yo(o,e,s,a);const u=c[0];if((0,rr.A)((0,Ci.A)(u))){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:Ou.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))}));return r}function mc(e,t,n,r){const i=[];const s=(0,Ji.A)(e,((n,r,s)=>{if(t.definition[s].ignoreAmbiguities===true){return n}(0,tr.A)(r,(r=>{const a=[s];(0,tr.A)(e,((e,n)=>{if(s!==n&&Xo(e,r)&&t.definition[n].ignoreAmbiguities!==true){a.push(n)}}));if(a.length>1&&!Xo(i,r)){i.push(r);n.push({alts:a,path:r})}}));return n}),[]);const a=(0,ir.A)(s,(e=>{const i=(0,ir.A)(e.alts,(e=>e+1));const s=r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path});return{message:s,type:Ou.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}}));return a}function gc(e,t,n,r){const i=(0,Ji.A)(e,((e,t,n)=>{const r=(0,ir.A)(t,(e=>({idx:n,path:e})));return e.concat(r)}),[]);const s=hs(lo(i,(e=>{const s=t.definition[e.idx];if(s.ignoreAmbiguities===true){return[]}const a=e.idx;const o=e.path;const c=(0,Zi.A)(i,(e=>t.definition[e.idx].ignoreAmbiguities!==true&&e.idx<a&&Qo(e.path,o)));const u=(0,ir.A)(c,(e=>{const i=[e.idx+1,a+1];const s=t.idx===0?"":t.idx;const o=r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path});return{message:o,type:Ou.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:s,alternatives:i}}));return u})));return s}function yc(e,t,n){const r=[];const i=(0,ir.A)(t,(e=>e.name));(0,tr.A)(e,(e=>{const t=e.name;if(hi(i,t)){const i=n.buildNamespaceConflictError(e);r.push({message:i,type:Ou.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}));return r}function Ac(e){const t=(0,Gi.A)(e,{errMsgProvider:so});const n={};(0,tr.A)(e.rules,(e=>{n[e.name]=e}));return oo(n,t.errMsgProvider)}function Tc(e){e=(0,Gi.A)(e,{errMsgProvider:ao});return ec(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}const vc="MismatchedTokenException";const Ec="NoViableAltException";const Rc="EarlyExitException";const kc="NotAllInputParsedException";const xc=[vc,Ec,Rc,kc];Object.freeze(xc);function Ic(e){return hi(xc,e.name)}class Sc extends Error{constructor(e,t){super(e);this.token=t;this.resyncedTokens=[];Object.setPrototypeOf(this,new.target.prototype);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}}class wc extends Sc{constructor(e,t,n){super(e,t);this.previousToken=n;this.name=vc}}class Nc extends Sc{constructor(e,t,n){super(e,t);this.previousToken=n;this.name=Ec}}class Cc extends Sc{constructor(e,t){super(e,t);this.name=kc}}class $c extends Sc{constructor(e,t,n){super(e,t);this.previousToken=n;this.name=Rc}}const Lc={};const bc="InRuleRecoveryException";class _c extends Error{constructor(e){super(e);this.name=bc}}class Oc{initRecoverable(e){this.firstAfterRepMap={};this.resyncFollows={};this.recoveryEnabled=(0,sr.A)(e,"recoveryEnabled")?e.recoveryEnabled:bu.recoveryEnabled;if(this.recoveryEnabled){this.attemptInRepetitionRecovery=Pc}}getTokenToInsert(e){const t=no(e,"",NaN,NaN,NaN,NaN,NaN,NaN);t.isInsertedInRecovery=true;return t}canTokenTypeBeInsertedInRecovery(e){return true}canTokenTypeBeDeletedInRecovery(e){return true}tryInRepetitionRecovery(e,t,n,r){const i=this.findReSyncTokenType();const s=this.exportLexerState();const a=[];let o=false;const c=this.LA(1);let u=this.LA(1);const l=()=>{const e=this.LA(0);const t=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:this.getCurrRuleFullName()});const n=new wc(t,c,this.LA(0));n.resyncedTokens=xo(a);this.SAVE_ERROR(n)};while(!o){if(this.tokenMatcher(u,r)){l();return}else if(n.call(this)){l();e.apply(this,t);return}else if(this.tokenMatcher(u,i)){o=true}else{u=this.SKIP_TOKEN();this.addToResyncTokens(u,a)}}this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,n){if(n===false){return false}if(this.tokenMatcher(this.LA(1),e)){return false}if(this.isBackTracking()){return false}if(this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))){return false}return true}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);const r=this.getNextPossibleTokenTypes(n);return r}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){const t=this.getTokenToInsert(e);return t}if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();this.consumeToken();return e}throw new _c("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)){return false}if((0,rr.A)(t)){return false}const n=this.LA(1);const r=(0,gs.A)(t,(e=>this.tokenMatcher(n,e)))!==undefined;return r}canRecoverWithSingleTokenDeletion(e){if(!this.canTokenTypeBeDeletedInRecovery(e)){return false}const t=this.tokenMatcher(this.LA(2),e);return t}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey();const n=this.getFollowSetFromFollowKey(t);return hi(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1);let n=2;while(true){const r=(0,gs.A)(e,(e=>{const n=ro(t,e);return n}));if(r!==undefined){return r}t=this.LA(n);n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1){return Lc}const e=this.getLastExplicitRuleShortName();const t=this.getLastExplicitRuleOccurrenceIndex();const n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK;const t=this.RULE_OCCURRENCE_STACK;return(0,ir.A)(e,((n,r)=>{if(r===0){return Lc}return{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])}}))}flattenFollowSet(){const e=(0,ir.A)(this.buildFullFollowKeyStack(),(e=>this.getFollowSetFromFollowKey(e)));return(0,Ci.A)(e)}getFollowSetFromFollowKey(e){if(e===Lc){return[to]}const t=e.ruleName+e.idxInCallingRule+Oi+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){if(!this.tokenMatcher(e,to)){t.push(e)}return t}reSyncTo(e){const t=[];let n=this.LA(1);while(this.tokenMatcher(n,e)===false){n=this.SKIP_TOKEN();this.addToResyncTokens(n,t)}return xo(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,a){}getCurrentGrammarPath(e,t){const n=this.getHumanReadableRuleStack();const r=(0,ar.A)(this.RULE_OCCURRENCE_STACK);const i={ruleStack:n,occurrenceStack:r,lastTok:e,lastTokOccurrence:t};return i}getHumanReadableRuleStack(){return(0,ir.A)(this.RULE_STACK,(e=>this.shortRuleNameToFullName(e)))}}function Pc(e,t,n,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[o];if(c===undefined){const e=this.getCurrRuleFullName();const t=this.getGAstProductions()[e];const n=new s(t,i);c=n.startWalking();this.firstAfterRepMap[o]=c}let u=c.token;let l=c.occurrence;const f=c.isEndOfRule;if(this.RULE_STACK.length===1&&f&&u===undefined){u=to;l=1}if(u===undefined||l===undefined){return}if(this.shouldInRepetitionRecoveryBeTried(u,l,a)){this.tryInRepetitionRecovery(e,t,n,u)}}const Mc=4;const Dc=8;const Uc=12;const Fc=8;const Gc=1<<Dc;const Bc=2<<Dc;const Kc=3<<Dc;const jc=4<<Dc;const Vc=5<<Dc;const Wc=6<<Dc;function Hc(e,t,n){return n|t|e}const zc=32-Fc;class qc{constructor(e){var t;this.maxLookahead=(t=e===null||e===void 0?void 0:e.maxLookahead)!==null&&t!==void 0?t:bu.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if((0,rr.A)(t)){const n=this.validateEmptyOrAlternatives(e.rules);const r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead);const i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);const s=[...t,...n,...r,...i];return s}return t}validateNoLeftRecursion(e){return lo(e,(e=>oc(e,e,ao)))}validateEmptyOrAlternatives(e){return lo(e,(e=>lc(e,ao)))}validateAmbiguousAlternationAlternatives(e,t){return lo(e,(e=>fc(e,t,ao)))}validateSomeNonEmptyLookaheadPath(e,t){return pc(e,t,ao)}buildLookaheadForAlternation(e){return Uo(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Go)}buildLookaheadForOptional(e){return Fo(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Mo(e.prodType),Bo)}}class Yc{initLooksAhead(e){this.dynamicTokensEnabled=(0,sr.A)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:bu.dynamicTokensEnabled;this.maxLookahead=(0,sr.A)(e,"maxLookahead")?e.maxLookahead:bu.maxLookahead;this.lookaheadStrategy=(0,sr.A)(e,"lookaheadStrategy")?e.lookaheadStrategy:new qc({maxLookahead:this.maxLookahead});this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){(0,tr.A)(e,(e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,(()=>{const{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:a}=Jc(e);(0,tr.A)(t,(t=>{const n=t.idx===0?"":t.idx;this.TRACE_INIT(`${ki(t)}${n}`,(()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled});const r=Hc(this.fullRuleNameToShort[e.name],Gc,t.idx);this.setLaFuncCache(r,n)}))}));(0,tr.A)(n,(t=>{this.computeLookaheadFunc(e,t.idx,Kc,"Repetition",t.maxLookahead,ki(t))}));(0,tr.A)(r,(t=>{this.computeLookaheadFunc(e,t.idx,Bc,"Option",t.maxLookahead,ki(t))}));(0,tr.A)(i,(t=>{this.computeLookaheadFunc(e,t.idx,jc,"RepetitionMandatory",t.maxLookahead,ki(t))}));(0,tr.A)(s,(t=>{this.computeLookaheadFunc(e,t.idx,Wc,"RepetitionMandatoryWithSeparator",t.maxLookahead,ki(t))}));(0,tr.A)(a,(t=>{this.computeLookaheadFunc(e,t.idx,Vc,"RepetitionWithSeparator",t.maxLookahead,ki(t))}))}))}))}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${t===0?"":t}`,(()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r});const a=Hc(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(a,s)}))}getKeyForAutomaticLookahead(e,t){const n=this.getLastExplicitRuleShortName();return Hc(n,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}}class Xc extends ti{constructor(){super(...arguments);this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}}const Qc=new Xc;function Jc(e){Qc.reset();e.accept(Qc);const t=Qc.dslMethods;Qc.reset();return t}function Zc(e,t){if(isNaN(e.startOffset)===true){e.startOffset=t.startOffset;e.endOffset=t.endOffset}else if(e.endOffset<t.endOffset===true){e.endOffset=t.endOffset}}function eu(e,t){if(isNaN(e.startOffset)===true){e.startOffset=t.startOffset;e.startColumn=t.startColumn;e.startLine=t.startLine;e.endOffset=t.endOffset;e.endColumn=t.endColumn;e.endLine=t.endLine}else if(e.endOffset<t.endOffset===true){e.endOffset=t.endOffset;e.endColumn=t.endColumn;e.endLine=t.endLine}}function tu(e,t,n){if(e.children[n]===undefined){e.children[n]=[t]}else{e.children[n].push(t)}}function nu(e,t,n){if(e.children[t]===undefined){e.children[t]=[n]}else{e.children[t].push(n)}}const ru="name";function iu(e,t){Object.defineProperty(e,ru,{enumerable:false,configurable:true,writable:false,value:t})}function su(e,t){const n=(0,Tr.A)(e);const r=n.length;for(let i=0;i<r;i++){const r=n[i];const s=e[r];const a=s.length;for(let e=0;e<a;e++){const n=s[e];if(n.tokenTypeIdx===undefined){this[n.name](n.children,t)}}}}function au(e,t){const n=function(){};iu(n,e+"BaseSemantics");const r={visit:function(e,t){if((0,ai.A)(e)){e=e[0]}if((0,Fi.A)(e)){return undefined}return this[e.name](e.children,t)},validateVisitor:function(){const e=uu(this,t);if(!(0,rr.A)(e)){const t=(0,ir.A)(e,(e=>e.msg));throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t`+`${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};n.prototype=r;n.prototype.constructor=n;n._RULE_NAMES=t;return n}function ou(e,t,n){const r=function(){};iu(r,e+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);(0,tr.A)(t,(e=>{i[e]=su}));r.prototype=i;r.prototype.constructor=r;return r}var cu;(function(e){e[e["REDUNDANT_METHOD"]=0]="REDUNDANT_METHOD";e[e["MISSING_METHOD"]=1]="MISSING_METHOD"})(cu||(cu={}));function uu(e,t){const n=lu(e,t);return n}function lu(e,t){const n=(0,Zi.A)(t,(t=>(0,qi.A)(e[t])===false));const r=(0,ir.A)(n,(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:cu.MISSING_METHOD,methodName:t})));return hs(r)}class fu{initTreeBuilder(e){this.CST_STACK=[];this.outputCst=e.outputCst;this.nodeLocationTracking=(0,sr.A)(e,"nodeLocationTracking")?e.nodeLocationTracking:bu.nodeLocationTracking;if(!this.outputCst){this.cstInvocationStateUpdate=Ta.A;this.cstFinallyStateUpdate=Ta.A;this.cstPostTerminal=Ta.A;this.cstPostNonTerminal=Ta.A;this.cstPostRule=Ta.A}else{if(/full/i.test(this.nodeLocationTracking)){if(this.recoveryEnabled){this.setNodeLocationFromToken=eu;this.setNodeLocationFromNode=eu;this.cstPostRule=Ta.A;this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery}else{this.setNodeLocationFromToken=Ta.A;this.setNodeLocationFromNode=Ta.A;this.cstPostRule=this.cstPostRuleFull;this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular}}else if(/onlyOffset/i.test(this.nodeLocationTracking)){if(this.recoveryEnabled){this.setNodeLocationFromToken=Zc;this.setNodeLocationFromNode=Zc;this.cstPostRule=Ta.A;this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery}else{this.setNodeLocationFromToken=Ta.A;this.setNodeLocationFromNode=Ta.A;this.cstPostRule=this.cstPostRuleOnlyOffset;this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular}}else if(/none/i.test(this.nodeLocationTracking)){this.setNodeLocationFromToken=Ta.A;this.setNodeLocationFromNode=Ta.A;this.cstPostRule=Ta.A;this.setInitialNodeLocation=Ta.A}else{throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}}}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t);this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0);const n=e.location;if(n.startOffset<=t.startOffset===true){n.endOffset=t.endOffset;n.endLine=t.endLine;n.endColumn=t.endColumn}else{n.startOffset=NaN;n.startLine=NaN;n.startColumn=NaN}}cstPostRuleOnlyOffset(e){const t=this.LA(0);const n=e.location;if(n.startOffset<=t.startOffset===true){n.endOffset=t.endOffset}else{n.startOffset=NaN}}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];tu(n,t,e);this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];nu(n,t,e);this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if((0,Fi.A)(this.baseCstVisitorConstructor)){const e=au(this.className,(0,Tr.A)(this.gastProductionsCache));this.baseCstVisitorConstructor=e;return e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,Fi.A)(this.baseCstVisitorWithDefaultsConstructor)){const e=ou(this.className,(0,Tr.A)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());this.baseCstVisitorWithDefaultsConstructor=e;return e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}class du{initLexerAdapter(){this.tokVector=[];this.tokVectorLength=0;this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==true){throw Error(`Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.`)}this.reset();this.tokVector=e;this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){if(this.currIdx<=this.tokVector.length-2){this.consumeToken();return this.LA(1)}else{return Lu}}LA(e){const t=this.currIdx+e;if(t<0||this.tokVectorLength<=t){return Lu}else{return this.tokVector[t]}}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class hu{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=_u){if(hi(this.definedRulesNames,e)){const t=ao.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className});const n={message:t,type:Ou.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(n)}this.definedRulesNames.push(e);const r=this.defineRule(e,t,n);this[e]=r;return r}OVERRIDE_RULE(e,t,n=_u){const r=ac(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(e,t,n);this[e]=i;return i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{e.apply(this,t);return true}catch(r){if(Ic(r)){return false}else{throw r}}finally{this.reloadRecogState(n);this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Zr((0,nr.A)(this.gastProductionsCache))}}var pu=n(85356);class mu{initRecognizerEngine(e,t){this.className=this.constructor.name;this.shortRuleNameToFull={};this.fullRuleNameToShort={};this.ruleShortNameIdx=256;this.tokenMatcher=ka;this.subruleIdx=0;this.definedRulesNames=[];this.tokensMap={};this.isBackTrackingStack=[];this.RULE_STACK=[];this.RULE_OCCURRENCE_STACK=[];this.gastProductionsCache={};if((0,sr.A)(t,"serializedGrammar")){throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n"+"\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n"+"\tFor Further details.")}if((0,ai.A)(e)){if((0,rr.A)(e)){throw Error("A Token Vocabulary cannot be empty.\n"+"\tNote that the first argument for the parser constructor\n"+"\tis no longer a Token vector (since v4.0).")}if(typeof e[0].startOffset==="number"){throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n"+"\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n"+"\tFor Further details.")}}if((0,ai.A)(e)){this.tokensMap=(0,Ji.A)(e,((e,t)=>{e[t.name]=t;return e}),{})}else if((0,sr.A)(e,"modes")&&Ti((0,Ci.A)((0,nr.A)(e.modes)),Ma)){const t=(0,Ci.A)((0,nr.A)(e.modes));const n=Ni(t);this.tokensMap=(0,Ji.A)(n,((e,t)=>{e[t.name]=t;return e}),{})}else if((0,pu.A)(e)){this.tokensMap=(0,ar.A)(e)}else{throw new Error("<tokensDictionary> argument must be An Array of Token constructors,"+" A dictionary of Token constructors or an IMultiModeLexerDefinition")}this.tokensMap["EOF"]=to;const n=(0,sr.A)(e,"modes")?(0,Ci.A)((0,nr.A)(e.modes)):(0,nr.A)(e);const r=Ti(n,(e=>(0,rr.A)(e.categoryMatches)));this.tokenMatcher=r?ka:Ra;Sa((0,nr.A)(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone){throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\n`+`Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`)}const r=(0,sr.A)(n,"resyncEnabled")?n.resyncEnabled:_u.resyncEnabled;const i=(0,sr.A)(n,"recoveryValueFunc")?n.recoveryValueFunc:_u.recoveryValueFunc;const s=this.ruleShortNameIdx<<Mc+Dc;this.ruleShortNameIdx++;this.shortRuleNameToFull[s]=e;this.fullRuleNameToShort[e]=s;let a;if(this.outputCst===true){a=function n(...a){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx);t.apply(this,a);const n=this.CST_STACK[this.CST_STACK.length-1];this.cstPostRule(n);return n}catch(o){return this.invokeRuleCatch(o,r,i)}finally{this.ruleFinallyStateUpdate()}}}else{a=function n(...a){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx);return t.apply(this,a)}catch(o){return this.invokeRuleCatch(o,r,i)}finally{this.ruleFinallyStateUpdate()}}}const o=Object.assign(a,{ruleName:e,originalGrammarAction:t});return o}invokeRuleCatch(e,t,n){const r=this.RULE_STACK.length===1;const i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Ic(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){t.resyncedTokens=this.reSyncTo(r);if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=true;return e}else{return n(e)}}else{if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=true;t.partialCstResult=e}throw t}}else if(r){this.moveToTerminatedState();return n(e)}else{throw t}}else{throw e}}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(Bc,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n);let i;if(typeof e!=="function"){i=e.DEF;const t=e.GATE;if(t!==undefined){const e=r;r=()=>t.call(this)&&e.call(this)}}else{i=e}if(r.call(this)===true){return i.call(this)}return undefined}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead(jc,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n);let i;if(typeof t!=="function"){i=t.DEF;const e=t.GATE;if(e!==undefined){const t=r;r=()=>e.call(this)&&t.call(this)}}else{i=t}if(r.call(this)===true){let e=this.doSingleRepetition(i);while(r.call(this)===true&&e===true){e=this.doSingleRepetition(i)}}else{throw this.raiseEarlyExitException(e,Po.REPETITION_MANDATORY,t.ERR_MSG)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],r,jc,e,$o)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(Wc,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF;const i=t.SEP;const s=this.getLaFuncFromCache(n);if(s.call(this)===true){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);while(this.tokenMatcher(this.LA(1),i)===true){this.CONSUME(i);r.call(this)}this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Lo],t,Wc,e,Lo)}else{throw this.raiseEarlyExitException(e,Po.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(Kc,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n);let i;if(typeof t!=="function"){i=t.DEF;const e=t.GATE;if(e!==undefined){const t=r;r=()=>e.call(this)&&t.call(this)}}else{i=t}let s=true;while(r.call(this)===true&&s===true){s=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.manyInternal,[e,t],r,Kc,e,No,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(Vc,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF;const i=t.SEP;const s=this.getLaFuncFromCache(n);if(s.call(this)===true){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);while(this.tokenMatcher(this.LA(1),i)===true){this.CONSUME(i);r.call(this)}this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Co],t,Vc,e,Co)}}repetitionSepSecondInternal(e,t,n,r,i){while(n()){this.CONSUME(t);r.call(this)}this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Wc,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();e.call(this);const n=this.getLexerPosition();return n>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(Gc,t);const r=(0,ai.A)(e)?e:e.DEF;const i=this.getLaFuncFromCache(n);const s=i.call(this,r);if(s!==undefined){const e=r[s];return e.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){this.RULE_STACK.pop();this.RULE_OCCURRENCE_STACK.pop();this.cstFinallyStateUpdate();if(this.RULE_STACK.length===0&&this.isAtEndOfInput()===false){const e=this.LA(1);const t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Cc(t,e))}}subruleInternal(e,t,n){let r;try{const i=n!==undefined?n.ARGS:undefined;this.subruleIdx=t;r=e.apply(this,i);this.cstPostNonTerminal(r,n!==undefined&&n.LABEL!==undefined?n.LABEL:e.ruleName);return r}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,t,n){if(Ic(e)&&e.partialCstResult!==undefined){this.cstPostNonTerminal(e.partialCstResult,t!==undefined&&t.LABEL!==undefined?t.LABEL:n);delete e.partialCstResult}throw e}consumeInternal(e,t,n){let r;try{const t=this.LA(1);if(this.tokenMatcher(t,e)===true){this.consumeToken();r=t}else{this.consumeInternalError(e,t,n)}}catch(i){r=this.consumeInternalRecovery(e,t,i)}this.cstPostTerminal(n!==undefined&&n.LABEL!==undefined?n.LABEL:e.name,r);return r}consumeInternalError(e,t,n){let r;const i=this.LA(0);if(n!==undefined&&n.ERR_MSG){r=n.ERR_MSG}else{r=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()})}throw this.SAVE_ERROR(new wc(r,t,i))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(r){if(r.name===bc){throw n}else{throw r}}}else{throw n}}saveRecogState(){const e=this.errors;const t=(0,ar.A)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors;this.importLexerState(e.lexerState);this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n);this.RULE_STACK.push(e);this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),to)}reset(){this.resetLexerState();this.subruleIdx=0;this.isBackTrackingStack=[];this.errors=[];this.RULE_STACK=[];this.CST_STACK=[];this.RULE_OCCURRENCE_STACK=[]}}class gu{initErrorHandler(e){this._errors=[];this.errorMessageProvider=(0,sr.A)(e,"errorMessageProvider")?e.errorMessageProvider:bu.errorMessageProvider}SAVE_ERROR(e){if(Ic(e)){e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,ar.A)(this.RULE_OCCURRENCE_STACK)};this._errors.push(e);return e}else{throw Error("Trying to save an Error which is not a RecognitionException")}}get errors(){return(0,ar.A)(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName();const i=this.getGAstProductions()[r];const s=Yo(e,i,t,this.maxLookahead);const a=s[0];const o=[];for(let u=1;u<=this.maxLookahead;u++){o.push(this.LA(u))}const c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new $c(c,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName();const r=this.getGAstProductions()[n];const i=qo(e,r,this.maxLookahead);const s=[];for(let c=1;c<=this.maxLookahead;c++){s.push(this.LA(c))}const a=this.LA(0);const o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:s,previous:a,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Nc(o,this.LA(1),a))}}class yu{initContentAssist(){}computeContentAssist(e,t){const n=this.gastProductionsCache[e];if((0,Fi.A)(n)){throw Error(`Rule ->${e}<- does not exist in this grammar.`)}return _o([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=ms(e.ruleStack);const n=this.getGAstProductions();const r=n[t];const i=new So(r,e).startWalking();return i}}const Au={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Au);const Tu=true;const vu=Math.pow(2,Dc)-1;const Eu=Za({name:"RECORDING_PHASE_TOKEN",pattern:Ga.NA});Sa([Eu]);const Ru=no(Eu,"This IToken indicates the Parser is in Recording Phase\n\t"+""+"See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Ru);const ku={name:"This CSTNode indicates the Parser is in Recording Phase\n\t"+"See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};class xu{initGastRecorder(e){this.recordingProdStack=[];this.RECORDING_PHASE=false}enableRecording(){this.RECORDING_PHASE=true;this.TRACE_INIT("Enable Recording",(()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)};this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)};this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)};this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)};this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)};this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)};this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)};this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this[`consume`]=function(e,t,n){return this.consumeInternalRecord(t,e,n)};this[`subrule`]=function(e,t,n){return this.subruleInternalRecord(t,e,n)};this[`option`]=function(e,t){return this.optionInternalRecord(t,e)};this[`or`]=function(e,t){return this.orInternalRecord(t,e)};this[`many`]=function(e,t){this.manyInternalRecord(e,t)};this[`atLeastOne`]=function(e,t){this.atLeastOneInternalRecord(e,t)};this.ACTION=this.ACTION_RECORD;this.BACKTRACK=this.BACKTRACK_RECORD;this.LA=this.LA_RECORD}))}disableRecording(){this.RECORDING_PHASE=false;this.TRACE_INIT("Deleting Recording methods",(()=>{const e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`];delete e[`SUBRULE${n}`];delete e[`OPTION${n}`];delete e[`OR${n}`];delete e[`MANY${n}`];delete e[`MANY_SEP${n}`];delete e[`AT_LEAST_ONE${n}`];delete e[`AT_LEAST_ONE_SEP${n}`]}delete e[`consume`];delete e[`subrule`];delete e[`option`];delete e[`or`];delete e[`many`];delete e[`atLeastOne`];delete e.ACTION;delete e.BACKTRACK;delete e.LA}))}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>true}LA_RECORD(e){return Lu}topLevelRuleRecord(e,t){try{const n=new Vr({definition:[],name:e});n.name=e;this.recordingProdStack.push(n);t.call(this);this.recordingProdStack.pop();return n}catch(n){if(n.KNOWN_RECORDER_ERROR!==true){try{n.message=n.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\t'+"https://chevrotain.io/docs/guide/internals.html#grammar-recording"}catch(r){throw n}}throw n}}optionInternalRecord(e,t){return Iu.call(this,Hr,e,t)}atLeastOneInternalRecord(e,t){Iu.call(this,zr,t,e)}atLeastOneSepFirstInternalRecord(e,t){Iu.call(this,qr,t,e,Tu)}manyInternalRecord(e,t){Iu.call(this,Yr,t,e)}manySepFirstInternalRecord(e,t){Iu.call(this,Xr,t,e,Tu)}orInternalRecord(e,t){return Su.call(this,e,t)}subruleInternalRecord(e,t,n){Nu(t);if(!e||(0,sr.A)(e,"ruleName")===false){const n=new Error(`<SUBRULE${wu(t)}> argument is invalid`+` expecting a Parser method reference but got: <${JSON.stringify(e)}>`+`\n inside top level rule: <${this.recordingProdStack[0].name}>`);n.KNOWN_RECORDER_ERROR=true;throw n}const r=(0,va.A)(this.recordingProdStack);const i=e.ruleName;const s=new jr({idx:t,nonTerminalName:i,label:n===null||n===void 0?void 0:n.LABEL,referencedRule:undefined});r.definition.push(s);return this.outputCst?ku:Au}consumeInternalRecord(e,t,n){Nu(t);if(!ba(e)){const n=new Error(`<CONSUME${wu(t)}> argument is invalid`+` expecting a TokenType reference but got: <${JSON.stringify(e)}>`+`\n inside top level rule: <${this.recordingProdStack[0].name}>`);n.KNOWN_RECORDER_ERROR=true;throw n}const r=(0,va.A)(this.recordingProdStack);const i=new Jr({idx:t,terminalType:e,label:n===null||n===void 0?void 0:n.LABEL});r.definition.push(i);return Ru}}function Iu(e,t,n,r=false){Nu(n);const i=(0,va.A)(this.recordingProdStack);const s=(0,qi.A)(t)?t:t.DEF;const a=new e({definition:[],idx:n});if(r){a.separator=t.SEP}if((0,sr.A)(t,"MAX_LOOKAHEAD")){a.maxLookahead=t.MAX_LOOKAHEAD}this.recordingProdStack.push(a);s.call(this);i.definition.push(a);this.recordingProdStack.pop();return Au}function Su(e,t){Nu(t);const n=(0,va.A)(this.recordingProdStack);const r=(0,ai.A)(e)===false;const i=r===false?e:e.DEF;const s=new Qr({definition:[],idx:t,ignoreAmbiguities:r&&e.IGNORE_AMBIGUITIES===true});if((0,sr.A)(e,"MAX_LOOKAHEAD")){s.maxLookahead=e.MAX_LOOKAHEAD}const a=ui(i,(e=>(0,qi.A)(e.GATE)));s.hasPredicates=a;n.definition.push(s);(0,tr.A)(i,(e=>{const t=new Wr({definition:[]});s.definition.push(t);if((0,sr.A)(e,"IGNORE_AMBIGUITIES")){t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES}else if((0,sr.A)(e,"GATE")){t.ignoreAmbiguities=true}this.recordingProdStack.push(t);e.ALT.call(this);this.recordingProdStack.pop()}));return Au}function wu(e){return e===0?"":`${e}`}function Nu(e){if(e<0||e>vu){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\t`+`Idx value must be a none negative value smaller than ${vu+1}`);t.KNOWN_RECORDER_ERROR=true;throw t}}class Cu{initPerformanceTracer(e){if((0,sr.A)(e,"traceInitPerf")){const t=e.traceInitPerf;const n=typeof t==="number";this.traceInitMaxIdent=n?t:Infinity;this.traceInitPerf=n?t>0:t}else{this.traceInitMaxIdent=0;this.traceInitPerf=bu.traceInitPerf}this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===true){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");if(this.traceInitIndent<this.traceInitMaxIdent){console.log(`${n}--\x3e <${e}>`)}const{time:r,value:i}=Ea(t);const s=r>10?console.warn:console.log;if(this.traceInitIndent<this.traceInitMaxIdent){s(`${n}<-- <${e}> time: ${r}ms`)}this.traceInitIndent--;return i}else{return t()}}}function $u(e,t){t.forEach((t=>{const n=t.prototype;Object.getOwnPropertyNames(n).forEach((r=>{if(r==="constructor"){return}const i=Object.getOwnPropertyDescriptor(n,r);if(i&&(i.get||i.set)){Object.defineProperty(e.prototype,r,i)}else{e.prototype[r]=t.prototype[r]}}))}))}const Lu=no(to,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Lu);const bu=Object.freeze({recoveryEnabled:false,maxLookahead:3,dynamicTokensEnabled:false,outputCst:true,errorMessageProvider:io,nodeLocationTracking:"none",traceInitPerf:false,skipValidations:false});const _u=Object.freeze({recoveryValueFunc:()=>undefined,resyncEnabled:true});var Ou;(function(e){e[e["INVALID_RULE_NAME"]=0]="INVALID_RULE_NAME";e[e["DUPLICATE_RULE_NAME"]=1]="DUPLICATE_RULE_NAME";e[e["INVALID_RULE_OVERRIDE"]=2]="INVALID_RULE_OVERRIDE";e[e["DUPLICATE_PRODUCTIONS"]=3]="DUPLICATE_PRODUCTIONS";e[e["UNRESOLVED_SUBRULE_REF"]=4]="UNRESOLVED_SUBRULE_REF";e[e["LEFT_RECURSION"]=5]="LEFT_RECURSION";e[e["NONE_LAST_EMPTY_ALT"]=6]="NONE_LAST_EMPTY_ALT";e[e["AMBIGUOUS_ALTS"]=7]="AMBIGUOUS_ALTS";e[e["CONFLICT_TOKENS_RULES_NAMESPACE"]=8]="CONFLICT_TOKENS_RULES_NAMESPACE";e[e["INVALID_TOKEN_NAME"]=9]="INVALID_TOKEN_NAME";e[e["NO_NON_EMPTY_LOOKAHEAD"]=10]="NO_NON_EMPTY_LOOKAHEAD";e[e["AMBIGUOUS_PREFIX_ALTS"]=11]="AMBIGUOUS_PREFIX_ALTS";e[e["TOO_MANY_ALTS"]=12]="TOO_MANY_ALTS";e[e["CUSTOM_LOOKAHEAD_VALIDATION"]=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Ou||(Ou={}));function Pu(e=undefined){return function(){return e}}class Mu{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated."+"\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",(()=>{let e;this.selfAnalysisDone=true;const t=this.className;this.TRACE_INIT("toFastProps",(()=>{or(this)}));this.TRACE_INIT("Grammar Recording",(()=>{try{this.enableRecording();(0,tr.A)(this.definedRulesNames,(e=>{const t=this[e];const n=t["originalGrammarAction"];let r;this.TRACE_INIT(`${e} Rule`,(()=>{r=this.topLevelRuleRecord(e,n)}));this.gastProductionsCache[e]=r}))}finally{this.disableRecording()}}));let n=[];this.TRACE_INIT("Grammar Resolving",(()=>{n=Ac({rules:(0,nr.A)(this.gastProductionsCache)});this.definitionErrors=this.definitionErrors.concat(n)}));this.TRACE_INIT("Grammar Validations",(()=>{if((0,rr.A)(n)&&this.skipValidations===false){const e=Tc({rules:(0,nr.A)(this.gastProductionsCache),tokenTypes:(0,nr.A)(this.tokensMap),errMsgProvider:ao,grammarName:t});const n=Zo({lookaheadStrategy:this.lookaheadStrategy,rules:(0,nr.A)(this.gastProductionsCache),tokenTypes:(0,nr.A)(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(e,n)}}));if((0,rr.A)(this.definitionErrors)){if(this.recoveryEnabled){this.TRACE_INIT("computeAllProdsFollows",(()=>{const e=Mi((0,nr.A)(this.gastProductionsCache));this.resyncFollows=e}))}this.TRACE_INIT("ComputeLookaheadFunctions",(()=>{var e,t;(t=(e=this.lookaheadStrategy).initialize)===null||t===void 0?void 0:t.call(e,{rules:(0,nr.A)(this.gastProductionsCache)});this.preComputeLookaheadFunctions((0,nr.A)(this.gastProductionsCache))}))}if(!Mu.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,rr.A)(this.definitionErrors)){e=(0,ir.A)(this.definitionErrors,(e=>e.message));throw new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)}}))}constructor(e,t){this.definitionErrors=[];this.selfAnalysisDone=false;const n=this;n.initErrorHandler(t);n.initLexerAdapter();n.initLooksAhead(t);n.initRecognizerEngine(e,t);n.initRecoverable(t);n.initTreeBuilder(t);n.initContentAssist();n.initGastRecorder(t);n.initPerformanceTracer(t);if((0,sr.A)(t,"ignoredIssues")){throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\t"+"Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\t"+"See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\t"+"For further details.")}this.skipValidations=(0,sr.A)(t,"skipValidations")?t.skipValidations:bu.skipValidations}}Mu.DEFER_DEFINITION_ERRORS_HANDLING=false;$u(Mu,[Oc,Yc,fu,du,mu,hu,gu,yu,xu,Cu]);class Du extends Mu{constructor(e,t=bu){const n=(0,ar.A)(t);n.outputCst=true;super(e,n)}}class Uu extends Mu{constructor(e,t=bu){const n=(0,ar.A)(t);n.outputCst=false;super(e,n)}}function Fu(e){const t=new Gu;const n=values(e);return map(n,(e=>t.visitRule(e)))}class Gu extends(null&&GAstVisitor){visitRule(e){const t=this.visitEach(e.definition);const n=groupBy(t,(e=>e.propertyName));const r=map(n,((e,t)=>{const n=!some(e,(e=>!e.canBeNull));let r=e[0].type;if(e.length>1){r=map(e,(e=>e.type))}return{name:t,type:r,optional:n}}));return{name:e.name,properties:r}}visitAlternative(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitOption(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitRepetition(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitRepetitionMandatory(e){return this.visitEach(e.definition)}visitRepetitionMandatoryWithSeparator(e){return this.visitEach(e.definition).concat({propertyName:e.separator.name,canBeNull:true,type:Bu(e.separator)})}visitRepetitionWithSeparator(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true}).concat({propertyName:e.separator.name,canBeNull:true,type:Bu(e.separator)})}visitAlternation(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitTerminal(e){return[{propertyName:e.label||e.terminalType.name,canBeNull:false,type:Bu(e)}]}visitNonTerminal(e){return[{propertyName:e.label||e.nonTerminalName,canBeNull:false,type:Bu(e)}]}visitEachAndOverrideWith(e,t){return map(this.visitEach(e),(e=>assign({},e,t)))}visitEach(e){return flatten(map(e,(e=>this.visit(e))))}}function Bu(e){if(e instanceof NonTerminal){return{kind:"rule",name:e.referencedRule.name}}return{kind:"token"}}const Ku={includeVisitorInterface:true,visitorInterfaceName:"ICstNodeVisitor"};function ju(e,t){const n=Object.assign(Object.assign({},Ku),t);const r=buildModel(e);return genDts(r,n)}function Vu(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API."+"\n\t It performs no action other than printing this message."+"\n\t Please avoid using it as it will be completely removed in the future")}class Wu{constructor(){throw new Error("The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.\t\n"+"See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0")}}function Hu(e,t,n){return`${e.name}_${t}_${n}`}const zu=0;const qu=1;const Yu=2;const Xu=4;const Qu=5;const Ju=6;const Zu=7;const el=8;const tl=9;const nl=10;const rl=11;const il=12;class sl{constructor(e){this.target=e}isEpsilon(){return false}}class al extends sl{constructor(e,t){super(e);this.tokenType=t}}class ol extends sl{constructor(e){super(e)}isEpsilon(){return true}}class cl extends sl{constructor(e,t,n){super(e);this.rule=t;this.followState=n}isEpsilon(){return true}}function ul(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};ll(t,e);const n=e.length;for(let r=0;r<n;r++){const n=e[r];const i=Al(t,n,n);if(i===undefined){continue}Nl(t,n,i)}return t}function ll(e,t){const n=t.length;for(let r=0;r<n;r++){const n=t[r];const i=$l(e,n,undefined,{type:Yu});const s=$l(e,n,undefined,{type:Zu});i.stop=s;e.ruleToStartState.set(n,i);e.ruleToStopState.set(n,s)}}function fl(e,t,n){if(n instanceof Jr){return Sl(e,t,n.terminalType,n)}else if(n instanceof jr){return wl(e,t,n)}else if(n instanceof Qr){return gl(e,t,n)}else if(n instanceof Hr){return yl(e,t,n)}else if(n instanceof Yr){return dl(e,t,n)}else if(n instanceof Xr){return hl(e,t,n)}else if(n instanceof zr){return pl(e,t,n)}else if(n instanceof qr){return ml(e,t,n)}else{return Al(e,t,n)}}function dl(e,t,n){const r=$l(e,t,n,{type:Qu});Rl(e,r);const i=kl(e,t,r,n,Al(e,t,n));return vl(e,t,n,i)}function hl(e,t,n){const r=$l(e,t,n,{type:Qu});Rl(e,r);const i=kl(e,t,r,n,Al(e,t,n));const s=Sl(e,t,n.separator,n);return vl(e,t,n,i,s)}function pl(e,t,n){const r=$l(e,t,n,{type:Xu});Rl(e,r);const i=kl(e,t,r,n,Al(e,t,n));return Tl(e,t,n,i)}function ml(e,t,n){const r=$l(e,t,n,{type:Xu});Rl(e,r);const i=kl(e,t,r,n,Al(e,t,n));const s=Sl(e,t,n.separator,n);return Tl(e,t,n,i,s)}function gl(e,t,n){const r=$l(e,t,n,{type:qu});Rl(e,r);const i=(0,ir.A)(n.definition,(n=>fl(e,t,n)));const s=kl(e,t,r,n,...i);return s}function yl(e,t,n){const r=$l(e,t,n,{type:qu});Rl(e,r);const i=kl(e,t,r,n,Al(e,t,n));return El(e,t,n,i)}function Al(e,t,n){const r=(0,Zi.A)((0,ir.A)(n.definition,(n=>fl(e,t,n))),(e=>e!==undefined));if(r.length===1){return r[0]}else if(r.length===0){return undefined}else{return Il(e,r)}}function Tl(e,t,n,r,i){const s=r.left;const a=r.right;const o=$l(e,t,n,{type:rl});Rl(e,o);const c=$l(e,t,n,{type:il});s.loopback=o;c.loopback=o;e.decisionMap[Hu(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=o;Cl(a,o);if(i===undefined){Cl(o,s);Cl(o,c)}else{Cl(o,c);Cl(o,i.left);Cl(i.right,s)}return{left:s,right:c}}function vl(e,t,n,r,i){const s=r.left;const a=r.right;const o=$l(e,t,n,{type:nl});Rl(e,o);const c=$l(e,t,n,{type:il});const u=$l(e,t,n,{type:tl});o.loopback=u;c.loopback=u;Cl(o,s);Cl(o,c);Cl(a,u);if(i!==undefined){Cl(u,c);Cl(u,i.left);Cl(i.right,s)}else{Cl(u,o)}e.decisionMap[Hu(t,i?"RepetitionWithSeparator":"Repetition",n.idx)]=o;return{left:o,right:c}}function El(e,t,n,r){const i=r.left;const s=r.right;Cl(i,s);e.decisionMap[Hu(t,"Option",n.idx)]=i;return r}function Rl(e,t){e.decisionStates.push(t);t.decision=e.decisionStates.length-1;return t.decision}function kl(e,t,n,r,...i){const s=$l(e,t,r,{type:el,start:n});n.end=s;for(const o of i){if(o!==undefined){Cl(n,o.left);Cl(o.right,s)}else{Cl(n,s)}}const a={left:n,right:s};e.decisionMap[Hu(t,xl(r),r.idx)]=n;return a}function xl(e){if(e instanceof Qr){return"Alternation"}else if(e instanceof Hr){return"Option"}else if(e instanceof Yr){return"Repetition"}else if(e instanceof Xr){return"RepetitionWithSeparator"}else if(e instanceof zr){return"RepetitionMandatory"}else if(e instanceof qr){return"RepetitionMandatoryWithSeparator"}else{throw new Error("Invalid production type encountered")}}function Il(e,t){const n=t.length;for(let s=0;s<n-1;s++){const n=t[s];let r;if(n.left.transitions.length===1){r=n.left.transitions[0]}const i=r instanceof cl;const a=r;const o=t[s+1].left;if(n.left.type===qu&&n.right.type===qu&&r!==undefined&&(i&&a.followState===n.right||r.target===n.right)){if(i){a.followState=o}else{r.target=o}bl(e,n.right)}else{Cl(n.right,o)}}const r=t[0];const i=t[n-1];return{left:r.left,right:i.right}}function Sl(e,t,n,r){const i=$l(e,t,r,{type:qu});const s=$l(e,t,r,{type:qu});Ll(i,new al(s,n));return{left:i,right:s}}function wl(e,t,n){const r=n.referencedRule;const i=e.ruleToStartState.get(r);const s=$l(e,t,n,{type:qu});const a=$l(e,t,n,{type:qu});const o=new cl(i,r,a);Ll(s,o);return{left:s,right:a}}function Nl(e,t,n){const r=e.ruleToStartState.get(t);Cl(r,n.left);const i=e.ruleToStopState.get(t);Cl(n.right,i);const s={left:r,right:i};return s}function Cl(e,t){const n=new ol(t);Ll(e,n)}function $l(e,t,n,r){const i=Object.assign({atn:e,production:n,epsilonOnlyTransitions:false,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},r);e.states.push(i);return i}function Ll(e,t){if(e.transitions.length===0){e.epsilonOnlyTransitions=t.isEpsilon()}e.transitions.push(t)}function bl(e,t){e.states.splice(e.states.indexOf(t),1)}const _l={};class Ol{constructor(){this.map={};this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const t=Pl(e);if(!(t in this.map)){this.map[t]=this.configs.length;this.configs.push(e)}}get elements(){return this.configs}get alts(){return(0,ir.A)(this.configs,(e=>e.alt))}get key(){let e="";for(const t in this.map){e+=t+":"}return e}}function Pl(e,t=true){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map((e=>e.stateNumber.toString())).join("_")}`}var Ml=n(963);function Dl(e,t){return e&&e.length?(0,Si.A)(e,(0,Ir.A)(t,2)):[]}const Ul=Dl;function Fl(e,t){const n={};return r=>{const i=r.toString();let s=n[i];if(s!==undefined){return s}else{s={atnStartState:e,decision:t,states:{}};n[i]=s;return s}}}class Gl{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let n=0;n<t;n++){e+=this.predicates[n]===true?"1":"0"}return e}}const Bl=new Gl;class Kl extends qc{constructor(e){var t;super();this.logging=(t=e===null||e===void 0?void 0:e.logging)!==null&&t!==void 0?t:e=>console.log(e)}initialize(e){this.atn=ul(e.rules);this.dfas=Vl(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=e;const s=this.dfas;const a=this.logging;const o=Hu(n,"Alternation",t);const c=this.atn.decisionMap[o];const u=c.decision;const l=(0,ir.A)(Do({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:n}),(e=>(0,ir.A)(e,(e=>e[0]))));if(jl(l,false)&&!i){const e=(0,Ji.A)(l,((e,t,n)=>{(0,tr.A)(t,(t=>{if(t){e[t.tokenTypeIdx]=n;(0,tr.A)(t.categoryMatches,(t=>{e[t]=n}))}}));return e}),{});if(r){return function(t){var n;const r=this.LA(1);const i=e[r.tokenTypeIdx];if(t!==undefined&&i!==undefined){const e=(n=t[i])===null||n===void 0?void 0:n.GATE;if(e!==undefined&&e.call(this)===false){return undefined}}return i}}else{return function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}}else if(r){return function(e){const t=new Gl;const n=e===undefined?0:e.length;for(let i=0;i<n;i++){const n=e===null||e===void 0?void 0:e[i].GATE;t.set(i,n===undefined||n.call(this))}const r=Wl.call(this,s,u,t,a);return typeof r==="number"?r:undefined}}else{return function(){const e=Wl.call(this,s,u,Bl,a);return typeof e==="number"?e:undefined}}}buildLookaheadForOptional(e){const{prodOccurrence:t,rule:n,prodType:r,dynamicTokensEnabled:i}=e;const s=this.dfas;const a=this.logging;const o=Hu(n,r,t);const c=this.atn.decisionMap[o];const u=c.decision;const l=(0,ir.A)(Do({maxLookahead:1,occurrence:t,prodType:r,rule:n}),(e=>(0,ir.A)(e,(e=>e[0]))));if(jl(l)&&l[0][0]&&!i){const e=l[0];const t=(0,Ci.A)(e);if(t.length===1&&(0,rr.A)(t[0].categoryMatches)){const e=t[0];const n=e.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===n}}else{const e=(0,Ji.A)(t,((e,t)=>{if(t!==undefined){e[t.tokenTypeIdx]=true;(0,tr.A)(t.categoryMatches,(t=>{e[t]=true}))}return e}),{});return function(){const t=this.LA(1);return e[t.tokenTypeIdx]===true}}}return function(){const e=Wl.call(this,s,u,Bl,a);return typeof e==="object"?false:e===0}}}function jl(e,t=true){const n=new Set;for(const r of e){const e=new Set;for(const i of r){if(i===undefined){if(t){break}else{return false}}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of r){if(n.has(t)){if(!e.has(t)){return false}}else{n.add(t);e.add(t)}}}}return true}function Vl(e){const t=e.decisionStates.length;const n=Array(t);for(let r=0;r<t;r++){n[r]=Fl(e.decisionStates[r],r)}return n}function Wl(e,t,n,r){const i=e[t](n);let s=i.start;if(s===undefined){const e=af(i.atnStartState);s=sf(i,nf(e));i.start=s}const a=Hl.apply(this,[i,s,n,r]);return a}function Hl(e,t,n,r){let i=t;let s=1;const a=[];let o=this.LA(s++);while(true){let t=Jl(i,o);if(t===undefined){t=zl.apply(this,[e,i,o,s,n,r])}if(t===_l){return Ql(a,i,o)}if(t.isAcceptState===true){return t.prediction}i=t;a.push(o);o=this.LA(s++)}}function zl(e,t,n,r,i,s){const a=Zl(t.configs,n,i);if(a.size===0){rf(e,t,n,_l);return _l}let o=nf(a);const c=tf(a,i);if(c!==undefined){o.isAcceptState=true;o.prediction=c;o.configs.uniqueAlt=c}else if(ff(a)){const t=(0,Ml.A)(a.alts);o.isAcceptState=true;o.prediction=t;o.configs.uniqueAlt=t;ql.apply(this,[e,r,a.alts,s])}o=rf(e,t,n,o);return o}function ql(e,t,n,r){const i=[];for(let u=1;u<=t;u++){i.push(this.LA(u).tokenType)}const s=e.atnStartState;const a=s.rule;const o=s.production;const c=Yl({topLevelRule:a,ambiguityIndices:n,production:o,prefixPath:i});r(c)}function Yl(e){const t=(0,ir.A)(e.prefixPath,(e=>Ba(e))).join(", ");const n=e.production.idx===0?"":e.production.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${Xl(e.production)}${n}>`+` inside <${e.topLevelRule.name}> Rule,\n`+`<${t}> may appears as a prefix path in all these alternatives.\n`;r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\n`+`For Further details.`;return r}function Xl(e){if(e instanceof jr){return"SUBRULE"}else if(e instanceof Hr){return"OPTION"}else if(e instanceof Qr){return"OR"}else if(e instanceof zr){return"AT_LEAST_ONE"}else if(e instanceof qr){return"AT_LEAST_ONE_SEP"}else if(e instanceof Xr){return"MANY_SEP"}else if(e instanceof Yr){return"MANY"}else if(e instanceof Jr){return"CONSUME"}else{throw Error("non exhaustive match")}}function Ql(e,t,n){const r=lo(t.configs.elements,(e=>e.state.transitions));const i=Ul(r.filter((e=>e instanceof al)).map((e=>e.tokenType)),(e=>e.tokenTypeIdx));return{actualToken:n,possibleTokenTypes:i,tokenPath:e}}function Jl(e,t){return e.edges[t.tokenTypeIdx]}function Zl(e,t,n){const r=new Ol;const i=[];for(const a of e.elements){if(n.is(a.alt)===false){continue}if(a.state.type===Zu){i.push(a);continue}const e=a.state.transitions.length;for(let n=0;n<e;n++){const e=a.state.transitions[n];const i=ef(e,t);if(i!==undefined){r.add({state:i,alt:a.alt,stack:a.stack})}}}let s;if(i.length===0&&r.size===1){s=r}if(s===undefined){s=new Ol;for(const e of r.elements){of(e,s)}}if(i.length>0&&!uf(s)){for(const e of i){s.add(e)}}return s}function ef(e,t){if(e instanceof al&&ro(t,e.tokenType)){return e.target}return undefined}function tf(e,t){let n;for(const r of e.elements){if(t.is(r.alt)===true){if(n===undefined){n=r.alt}else if(n!==r.alt){return undefined}}}return n}function nf(e){return{configs:e,edges:{},isAcceptState:false,prediction:-1}}function rf(e,t,n,r){r=sf(e,r);t.edges[n.tokenTypeIdx]=r;return r}function sf(e,t){if(t===_l){return t}const n=t.configs.key;const r=e.states[n];if(r!==undefined){return r}t.configs.finalize();e.states[n]=t;return t}function af(e){const t=new Ol;const n=e.transitions.length;for(let r=0;r<n;r++){const n=e.transitions[r].target;const i={state:n,alt:r,stack:[]};of(i,t)}return t}function of(e,t){const n=e.state;if(n.type===Zu){if(e.stack.length>0){const n=[...e.stack];const r=n.pop();const i={state:r,alt:e.alt,stack:n};of(i,t)}else{t.add(e)}return}if(!n.epsilonOnlyTransitions){t.add(e)}const r=n.transitions.length;for(let i=0;i<r;i++){const r=n.transitions[i];const s=cf(e,r);if(s!==undefined){of(s,t)}}}function cf(e,t){if(t instanceof ol){return{state:t.target,alt:e.alt,stack:e.stack}}else if(t instanceof cl){const n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}return undefined}function uf(e){for(const t of e.elements){if(t.state.type===Zu){return true}}return false}function lf(e){for(const t of e.elements){if(t.state.type!==Zu){return false}}return true}function ff(e){if(lf(e)){return true}const t=df(e.elements);const n=hf(t)&&!pf(t);return n}function df(e){const t=new Map;for(const n of e){const e=Pl(n,false);let r=t.get(e);if(r===undefined){r={};t.set(e,r)}r[n.alt]=true}return t}function hf(e){for(const t of Array.from(e.values())){if(Object.keys(t).length>1){return true}}return false}function pf(e){for(const t of Array.from(e.values())){if(Object.keys(t).length===1){return true}}return false}var mf;(function(e){function t(e){return typeof e==="string"}e.is=t})(mf||(mf={}));var gf;(function(e){function t(e){return typeof e==="string"}e.is=t})(gf||(gf={}));var yf;(function(e){e.MIN_VALUE=-2147483648;e.MAX_VALUE=2147483647;function t(t){return typeof t==="number"&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(yf||(yf={}));var Af;(function(e){e.MIN_VALUE=0;e.MAX_VALUE=2147483647;function t(t){return typeof t==="number"&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(Af||(Af={}));var Tf;(function(e){function t(e,t){if(e===Number.MAX_VALUE){e=Af.MAX_VALUE}if(t===Number.MAX_VALUE){t=Af.MAX_VALUE}return{line:e,character:t}}e.create=t;function n(e){let t=e;return Wd.objectLiteral(t)&&Wd.uinteger(t.line)&&Wd.uinteger(t.character)}e.is=n})(Tf||(Tf={}));var vf;(function(e){function t(e,t,n,r){if(Wd.uinteger(e)&&Wd.uinteger(t)&&Wd.uinteger(n)&&Wd.uinteger(r)){return{start:Tf.create(e,t),end:Tf.create(n,r)}}else if(Tf.is(e)&&Tf.is(t)){return{start:e,end:t}}else{throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}}e.create=t;function n(e){let t=e;return Wd.objectLiteral(t)&&Tf.is(t.start)&&Tf.is(t.end)}e.is=n})(vf||(vf={}));var Ef;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return Wd.objectLiteral(t)&&vf.is(t.range)&&(Wd.string(t.uri)||Wd.undefined(t.uri))}e.is=n})(Ef||(Ef={}));var Rf;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return Wd.objectLiteral(t)&&vf.is(t.targetRange)&&Wd.string(t.targetUri)&&vf.is(t.targetSelectionRange)&&(vf.is(t.originSelectionRange)||Wd.undefined(t.originSelectionRange))}e.is=n})(Rf||(Rf={}));var kf;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&Wd.numberRange(t.red,0,1)&&Wd.numberRange(t.green,0,1)&&Wd.numberRange(t.blue,0,1)&&Wd.numberRange(t.alpha,0,1)}e.is=n})(kf||(kf={}));var xf;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&vf.is(t.range)&&kf.is(t.color)}e.is=n})(xf||(xf={}));var If;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&Wd.string(t.label)&&(Wd.undefined(t.textEdit)||Of.is(t))&&(Wd.undefined(t.additionalTextEdits)||Wd.typedArray(t.additionalTextEdits,Of.is))}e.is=n})(If||(If={}));var Sf;(function(e){e.Comment="comment";e.Imports="imports";e.Region="region"})(Sf||(Sf={}));var wf;(function(e){function t(e,t,n,r,i,s){const a={startLine:e,endLine:t};if(Wd.defined(n)){a.startCharacter=n}if(Wd.defined(r)){a.endCharacter=r}if(Wd.defined(i)){a.kind=i}if(Wd.defined(s)){a.collapsedText=s}return a}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&Wd.uinteger(t.startLine)&&Wd.uinteger(t.startLine)&&(Wd.undefined(t.startCharacter)||Wd.uinteger(t.startCharacter))&&(Wd.undefined(t.endCharacter)||Wd.uinteger(t.endCharacter))&&(Wd.undefined(t.kind)||Wd.string(t.kind))}e.is=n})(wf||(wf={}));var Nf;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Ef.is(t.location)&&Wd.string(t.message)}e.is=n})(Nf||(Nf={}));var Cf;(function(e){e.Error=1;e.Warning=2;e.Information=3;e.Hint=4})(Cf||(Cf={}));var $f;(function(e){e.Unnecessary=1;e.Deprecated=2})($f||($f={}));var Lf;(function(e){function t(e){const t=e;return Wd.objectLiteral(t)&&Wd.string(t.href)}e.is=t})(Lf||(Lf={}));var bf;(function(e){function t(e,t,n,r,i,s){let a={range:e,message:t};if(Wd.defined(n)){a.severity=n}if(Wd.defined(r)){a.code=r}if(Wd.defined(i)){a.source=i}if(Wd.defined(s)){a.relatedInformation=s}return a}e.create=t;function n(e){var t;let n=e;return Wd.defined(n)&&vf.is(n.range)&&Wd.string(n.message)&&(Wd.number(n.severity)||Wd.undefined(n.severity))&&(Wd.integer(n.code)||Wd.string(n.code)||Wd.undefined(n.code))&&(Wd.undefined(n.codeDescription)||Wd.string((t=n.codeDescription)===null||t===void 0?void 0:t.href))&&(Wd.string(n.source)||Wd.undefined(n.source))&&(Wd.undefined(n.relatedInformation)||Wd.typedArray(n.relatedInformation,Nf.is))}e.is=n})(bf||(bf={}));var _f;(function(e){function t(e,t,...n){let r={title:e,command:t};if(Wd.defined(n)&&n.length>0){r.arguments=n}return r}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.title)&&Wd.string(t.command)}e.is=n})(_f||(_f={}));var Of;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:""}}e.del=r;function i(e){const t=e;return Wd.objectLiteral(t)&&Wd.string(t.newText)&&vf.is(t.range)}e.is=i})(Of||(Of={}));var Pf;(function(e){function t(e,t,n){const r={label:e};if(t!==undefined){r.needsConfirmation=t}if(n!==undefined){r.description=n}return r}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&Wd.string(t.label)&&(Wd.boolean(t.needsConfirmation)||t.needsConfirmation===undefined)&&(Wd.string(t.description)||t.description===undefined)}e.is=n})(Pf||(Pf={}));var Mf;(function(e){function t(e){const t=e;return Wd.string(t)}e.is=t})(Mf||(Mf={}));var Df;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:"",annotationId:t}}e.del=r;function i(e){const t=e;return Of.is(t)&&(Pf.is(t.annotationId)||Mf.is(t.annotationId))}e.is=i})(Df||(Df={}));var Uf;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&qf.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(Uf||(Uf={}));var Ff;(function(e){function t(e,t,n){let r={kind:"create",uri:e};if(t!==undefined&&(t.overwrite!==undefined||t.ignoreIfExists!==undefined)){r.options=t}if(n!==undefined){r.annotationId=n}return r}e.create=t;function n(e){let t=e;return t&&t.kind==="create"&&Wd.string(t.uri)&&(t.options===undefined||(t.options.overwrite===undefined||Wd.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===undefined||Wd.boolean(t.options.ignoreIfExists)))&&(t.annotationId===undefined||Mf.is(t.annotationId))}e.is=n})(Ff||(Ff={}));var Gf;(function(e){function t(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};if(n!==undefined&&(n.overwrite!==undefined||n.ignoreIfExists!==undefined)){i.options=n}if(r!==undefined){i.annotationId=r}return i}e.create=t;function n(e){let t=e;return t&&t.kind==="rename"&&Wd.string(t.oldUri)&&Wd.string(t.newUri)&&(t.options===undefined||(t.options.overwrite===undefined||Wd.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===undefined||Wd.boolean(t.options.ignoreIfExists)))&&(t.annotationId===undefined||Mf.is(t.annotationId))}e.is=n})(Gf||(Gf={}));var Bf;(function(e){function t(e,t,n){let r={kind:"delete",uri:e};if(t!==undefined&&(t.recursive!==undefined||t.ignoreIfNotExists!==undefined)){r.options=t}if(n!==undefined){r.annotationId=n}return r}e.create=t;function n(e){let t=e;return t&&t.kind==="delete"&&Wd.string(t.uri)&&(t.options===undefined||(t.options.recursive===undefined||Wd.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===undefined||Wd.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===undefined||Mf.is(t.annotationId))}e.is=n})(Bf||(Bf={}));var Kf;(function(e){function t(e){let t=e;return t&&(t.changes!==undefined||t.documentChanges!==undefined)&&(t.documentChanges===undefined||t.documentChanges.every((e=>{if(Wd.string(e.kind)){return Ff.is(e)||Gf.is(e)||Bf.is(e)}else{return Uf.is(e)}})))}e.is=t})(Kf||(Kf={}));class jf{constructor(e,t){this.edits=e;this.changeAnnotations=t}insert(e,t,n){let r;let i;if(n===undefined){r=Of.insert(e,t)}else if(Mf.is(n)){i=n;r=Df.insert(e,t,n)}else{this.assertChangeAnnotations(this.changeAnnotations);i=this.changeAnnotations.manage(n);r=Df.insert(e,t,i)}this.edits.push(r);if(i!==undefined){return i}}replace(e,t,n){let r;let i;if(n===undefined){r=Of.replace(e,t)}else if(Mf.is(n)){i=n;r=Df.replace(e,t,n)}else{this.assertChangeAnnotations(this.changeAnnotations);i=this.changeAnnotations.manage(n);r=Df.replace(e,t,i)}this.edits.push(r);if(i!==undefined){return i}}delete(e,t){let n;let r;if(t===undefined){n=Of.del(e)}else if(Mf.is(t)){r=t;n=Df.del(e,t)}else{this.assertChangeAnnotations(this.changeAnnotations);r=this.changeAnnotations.manage(t);n=Df.del(e,r)}this.edits.push(n);if(r!==undefined){return r}}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===undefined){throw new Error(`Text edit change is not configured to manage change annotations.`)}}}class Vf{constructor(e){this._annotations=e===undefined?Object.create(null):e;this._counter=0;this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(Mf.is(e)){n=e}else{n=this.nextId();t=e}if(this._annotations[n]!==undefined){throw new Error(`Id ${n} is already in use.`)}if(t===undefined){throw new Error(`No annotation provided for id ${n}`)}this._annotations[n]=t;this._size++;return n}nextId(){this._counter++;return this._counter.toString()}}class Wf{constructor(e){this._textEditChanges=Object.create(null);if(e!==undefined){this._workspaceEdit=e;if(e.documentChanges){this._changeAnnotations=new Vf(e.changeAnnotations);e.changeAnnotations=this._changeAnnotations.all();e.documentChanges.forEach((e=>{if(Uf.is(e)){const t=new jf(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))}else if(e.changes){Object.keys(e.changes).forEach((t=>{const n=new jf(e.changes[t]);this._textEditChanges[t]=n}))}}else{this._workspaceEdit={}}}get edit(){this.initDocumentChanges();if(this._changeAnnotations!==undefined){if(this._changeAnnotations.size===0){this._workspaceEdit.changeAnnotations=undefined}else{this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()}}return this._workspaceEdit}getTextEditChange(e){if(qf.is(e)){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[];const r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r);n=new jf(e,this._changeAnnotations);this._textEditChanges[t.uri]=n}return n}else{this.initChanges();if(this._workspaceEdit.changes===undefined){throw new Error("Workspace edit is not configured for normal text edit changes.")}let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n;t=new jf(n);this._textEditChanges[e]=t}return t}}initDocumentChanges(){if(this._workspaceEdit.documentChanges===undefined&&this._workspaceEdit.changes===undefined){this._changeAnnotations=new Vf;this._workspaceEdit.documentChanges=[];this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()}}initChanges(){if(this._workspaceEdit.documentChanges===undefined&&this._workspaceEdit.changes===undefined){this._workspaceEdit.changes=Object.create(null)}}createFile(e,t,n){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}let r;if(Pf.is(t)||Mf.is(t)){r=t}else{n=t}let i;let s;if(r===undefined){i=Ff.create(e,n)}else{s=Mf.is(r)?r:this._changeAnnotations.manage(r);i=Ff.create(e,n,s)}this._workspaceEdit.documentChanges.push(i);if(s!==undefined){return s}}renameFile(e,t,n,r){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}let i;if(Pf.is(n)||Mf.is(n)){i=n}else{r=n}let s;let a;if(i===undefined){s=Gf.create(e,t,r)}else{a=Mf.is(i)?i:this._changeAnnotations.manage(i);s=Gf.create(e,t,r,a)}this._workspaceEdit.documentChanges.push(s);if(a!==undefined){return a}}deleteFile(e,t,n){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}let r;if(Pf.is(t)||Mf.is(t)){r=t}else{n=t}let i;let s;if(r===undefined){i=Bf.create(e,n)}else{s=Mf.is(r)?r:this._changeAnnotations.manage(r);i=Bf.create(e,n,s)}this._workspaceEdit.documentChanges.push(i);if(s!==undefined){return s}}}var Hf;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.uri)}e.is=n})(Hf||(Hf={}));var zf;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.uri)&&Wd.integer(t.version)}e.is=n})(zf||(zf={}));var qf;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.uri)&&(t.version===null||Wd.integer(t.version))}e.is=n})(qf||(qf={}));var Yf;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.uri)&&Wd.string(t.languageId)&&Wd.integer(t.version)&&Wd.string(t.text)}e.is=n})(Yf||(Yf={}));var Xf;(function(e){e.PlainText="plaintext";e.Markdown="markdown";function t(t){const n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(Xf||(Xf={}));var Qf;(function(e){function t(e){const t=e;return Wd.objectLiteral(e)&&Xf.is(t.kind)&&Wd.string(t.value)}e.is=t})(Qf||(Qf={}));var Jf;(function(e){e.Text=1;e.Method=2;e.Function=3;e.Constructor=4;e.Field=5;e.Variable=6;e.Class=7;e.Interface=8;e.Module=9;e.Property=10;e.Unit=11;e.Value=12;e.Enum=13;e.Keyword=14;e.Snippet=15;e.Color=16;e.File=17;e.Reference=18;e.Folder=19;e.EnumMember=20;e.Constant=21;e.Struct=22;e.Event=23;e.Operator=24;e.TypeParameter=25})(Jf||(Jf={}));var Zf;(function(e){e.PlainText=1;e.Snippet=2})(Zf||(Zf={}));var ed;(function(e){e.Deprecated=1})(ed||(ed={}));var td;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){const t=e;return t&&Wd.string(t.newText)&&vf.is(t.insert)&&vf.is(t.replace)}e.is=n})(td||(td={}));var nd;(function(e){e.asIs=1;e.adjustIndentation=2})(nd||(nd={}));var rd;(function(e){function t(e){const t=e;return t&&(Wd.string(t.detail)||t.detail===undefined)&&(Wd.string(t.description)||t.description===undefined)}e.is=t})(rd||(rd={}));var id;(function(e){function t(e){return{label:e}}e.create=t})(id||(id={}));var sd;(function(e){function t(e,t){return{items:e?e:[],isIncomplete:!!t}}e.create=t})(sd||(sd={}));var ad;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(e){const t=e;return Wd.string(t)||Wd.objectLiteral(t)&&Wd.string(t.language)&&Wd.string(t.value)}e.is=n})(ad||(ad={}));var od;(function(e){function t(e){let t=e;return!!t&&Wd.objectLiteral(t)&&(Qf.is(t.contents)||ad.is(t.contents)||Wd.typedArray(t.contents,ad.is))&&(e.range===undefined||vf.is(e.range))}e.is=t})(od||(od={}));var cd;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(cd||(cd={}));var ud;(function(e){function t(e,t,...n){let r={label:e};if(Wd.defined(t)){r.documentation=t}if(Wd.defined(n)){r.parameters=n}else{r.parameters=[]}return r}e.create=t})(ud||(ud={}));var ld;(function(e){e.Text=1;e.Read=2;e.Write=3})(ld||(ld={}));var fd;(function(e){function t(e,t){let n={range:e};if(Wd.number(t)){n.kind=t}return n}e.create=t})(fd||(fd={}));var dd;(function(e){e.File=1;e.Module=2;e.Namespace=3;e.Package=4;e.Class=5;e.Method=6;e.Property=7;e.Field=8;e.Constructor=9;e.Enum=10;e.Interface=11;e.Function=12;e.Variable=13;e.Constant=14;e.String=15;e.Number=16;e.Boolean=17;e.Array=18;e.Object=19;e.Key=20;e.Null=21;e.EnumMember=22;e.Struct=23;e.Event=24;e.Operator=25;e.TypeParameter=26})(dd||(dd={}));var hd;(function(e){e.Deprecated=1})(hd||(hd={}));var pd;(function(e){function t(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};if(i){s.containerName=i}return s}e.create=t})(pd||(pd={}));var md;(function(e){function t(e,t,n,r){return r!==undefined?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}e.create=t})(md||(md={}));var gd;(function(e){function t(e,t,n,r,i,s){let a={name:e,detail:t,kind:n,range:r,selectionRange:i};if(s!==undefined){a.children=s}return a}e.create=t;function n(e){let t=e;return t&&Wd.string(t.name)&&Wd.number(t.kind)&&vf.is(t.range)&&vf.is(t.selectionRange)&&(t.detail===undefined||Wd.string(t.detail))&&(t.deprecated===undefined||Wd.boolean(t.deprecated))&&(t.children===undefined||Array.isArray(t.children))&&(t.tags===undefined||Array.isArray(t.tags))}e.is=n})(gd||(gd={}));var yd;(function(e){e.Empty="";e.QuickFix="quickfix";e.Refactor="refactor";e.RefactorExtract="refactor.extract";e.RefactorInline="refactor.inline";e.RefactorRewrite="refactor.rewrite";e.Source="source";e.SourceOrganizeImports="source.organizeImports";e.SourceFixAll="source.fixAll"})(yd||(yd={}));var Ad;(function(e){e.Invoked=1;e.Automatic=2})(Ad||(Ad={}));var Td;(function(e){function t(e,t,n){let r={diagnostics:e};if(t!==undefined&&t!==null){r.only=t}if(n!==undefined&&n!==null){r.triggerKind=n}return r}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.typedArray(t.diagnostics,bf.is)&&(t.only===undefined||Wd.typedArray(t.only,Wd.string))&&(t.triggerKind===undefined||t.triggerKind===Ad.Invoked||t.triggerKind===Ad.Automatic)}e.is=n})(Td||(Td={}));var vd;(function(e){function t(e,t,n){let r={title:e};let i=true;if(typeof t==="string"){i=false;r.kind=t}else if(_f.is(t)){r.command=t}else{r.edit=t}if(i&&n!==undefined){r.kind=n}return r}e.create=t;function n(e){let t=e;return t&&Wd.string(t.title)&&(t.diagnostics===undefined||Wd.typedArray(t.diagnostics,bf.is))&&(t.kind===undefined||Wd.string(t.kind))&&(t.edit!==undefined||t.command!==undefined)&&(t.command===undefined||_f.is(t.command))&&(t.isPreferred===undefined||Wd.boolean(t.isPreferred))&&(t.edit===undefined||Kf.is(t.edit))}e.is=n})(vd||(vd={}));var Ed;(function(e){function t(e,t){let n={range:e};if(Wd.defined(t)){n.data=t}return n}e.create=t;function n(e){let t=e;return Wd.defined(t)&&vf.is(t.range)&&(Wd.undefined(t.command)||_f.is(t.command))}e.is=n})(Ed||(Ed={}));var Rd;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.uinteger(t.tabSize)&&Wd.boolean(t.insertSpaces)}e.is=n})(Rd||(Rd={}));var kd;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return Wd.defined(t)&&vf.is(t.range)&&(Wd.undefined(t.target)||Wd.string(t.target))}e.is=n})(kd||(kd={}));var xd;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return Wd.objectLiteral(n)&&vf.is(n.range)&&(n.parent===undefined||e.is(n.parent))}e.is=n})(xd||(xd={}));var Id;(function(e){e["namespace"]="namespace";e["type"]="type";e["class"]="class";e["enum"]="enum";e["interface"]="interface";e["struct"]="struct";e["typeParameter"]="typeParameter";e["parameter"]="parameter";e["variable"]="variable";e["property"]="property";e["enumMember"]="enumMember";e["event"]="event";e["function"]="function";e["method"]="method";e["macro"]="macro";e["keyword"]="keyword";e["modifier"]="modifier";e["comment"]="comment";e["string"]="string";e["number"]="number";e["regexp"]="regexp";e["operator"]="operator";e["decorator"]="decorator"})(Id||(Id={}));var Sd;(function(e){e["declaration"]="declaration";e["definition"]="definition";e["readonly"]="readonly";e["static"]="static";e["deprecated"]="deprecated";e["abstract"]="abstract";e["async"]="async";e["modification"]="modification";e["documentation"]="documentation";e["defaultLibrary"]="defaultLibrary"})(Sd||(Sd={}));var wd;(function(e){function t(e){const t=e;return Wd.objectLiteral(t)&&(t.resultId===undefined||typeof t.resultId==="string")&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==="number")}e.is=t})(wd||(wd={}));var Nd;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){const t=e;return t!==undefined&&t!==null&&vf.is(t.range)&&Wd.string(t.text)}e.is=n})(Nd||(Nd={}));var Cd;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){const t=e;return t!==undefined&&t!==null&&vf.is(t.range)&&Wd.boolean(t.caseSensitiveLookup)&&(Wd.string(t.variableName)||t.variableName===undefined)}e.is=n})(Cd||(Cd={}));var $d;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){const t=e;return t!==undefined&&t!==null&&vf.is(t.range)&&(Wd.string(t.expression)||t.expression===undefined)}e.is=n})($d||($d={}));var Ld;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){const t=e;return Wd.defined(t)&&vf.is(e.stoppedLocation)}e.is=n})(Ld||(Ld={}));var bd;(function(e){e.Type=1;e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(bd||(bd={}));var _d;(function(e){function t(e){return{value:e}}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&(t.tooltip===undefined||Wd.string(t.tooltip)||Qf.is(t.tooltip))&&(t.location===undefined||Ef.is(t.location))&&(t.command===undefined||_f.is(t.command))}e.is=n})(_d||(_d={}));var Od;(function(e){function t(e,t,n){const r={position:e,label:t};if(n!==undefined){r.kind=n}return r}e.create=t;function n(e){const t=e;return Wd.objectLiteral(t)&&Tf.is(t.position)&&(Wd.string(t.label)||Wd.typedArray(t.label,_d.is))&&(t.kind===undefined||bd.is(t.kind))&&t.textEdits===undefined||Wd.typedArray(t.textEdits,Of.is)&&(t.tooltip===undefined||Wd.string(t.tooltip)||Qf.is(t.tooltip))&&(t.paddingLeft===undefined||Wd.boolean(t.paddingLeft))&&(t.paddingRight===undefined||Wd.boolean(t.paddingRight))}e.is=n})(Od||(Od={}));var Pd;(function(e){function t(e){return{kind:"snippet",value:e}}e.createSnippet=t})(Pd||(Pd={}));var Md;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Md||(Md={}));var Dd;(function(e){function t(e){return{items:e}}e.create=t})(Dd||(Dd={}));var Ud;(function(e){e.Invoked=0;e.Automatic=1})(Ud||(Ud={}));var Fd;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(Fd||(Fd={}));var Gd;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Gd||(Gd={}));var Bd;(function(e){function t(e){const t=e;return Wd.objectLiteral(t)&&gf.is(t.uri)&&Wd.string(t.name)}e.is=t})(Bd||(Bd={}));const Kd=null&&["\n","\r\n","\r"];var jd;(function(e){function t(e,t,n,r){return new Vd(e,t,n,r)}e.create=t;function n(e){let t=e;return Wd.defined(t)&&Wd.string(t.uri)&&(Wd.undefined(t.languageId)||Wd.string(t.languageId))&&Wd.uinteger(t.lineCount)&&Wd.func(t.getText)&&Wd.func(t.positionAt)&&Wd.func(t.offsetAt)?true:false}e.is=n;function r(e,t){let n=e.getText();let r=i(t,((e,t)=>{let n=e.range.start.line-t.range.start.line;if(n===0){return e.range.start.character-t.range.start.character}return n}));let s=n.length;for(let i=r.length-1;i>=0;i--){let t=r[i];let a=e.offsetAt(t.range.start);let o=e.offsetAt(t.range.end);if(o<=s){n=n.substring(0,a)+t.newText+n.substring(o,n.length)}else{throw new Error("Overlapping edit")}s=a}return n}e.applyEdits=r;function i(e,t){if(e.length<=1){return e}const n=e.length/2|0;const r=e.slice(0,n);const s=e.slice(n);i(r,t);i(s,t);let a=0;let o=0;let c=0;while(a<r.length&&o<s.length){let n=t(r[a],s[o]);if(n<=0){e[c++]=r[a++]}else{e[c++]=s[o++]}}while(a<r.length){e[c++]=r[a++]}while(o<s.length){e[c++]=s[o++]}return e}})(jd||(jd={}));class Vd{constructor(e,t,n,r){this._uri=e;this._languageId=t;this._version=n;this._content=r;this._lineOffsets=undefined}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start);let n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text;this._version=t;this._lineOffsets=undefined}getLineOffsets(){if(this._lineOffsets===undefined){let e=[];let t=this._content;let n=true;for(let r=0;r<t.length;r++){if(n){e.push(r);n=false}let i=t.charAt(r);n=i==="\r"||i==="\n";if(i==="\r"&&r+1<t.length&&t.charAt(r+1)==="\n"){r++}}if(n&&t.length>0){e.push(t.length)}this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets();let n=0,r=t.length;if(r===0){return Tf.create(0,e)}while(n<r){let i=Math.floor((n+r)/2);if(t[i]>e){r=i}else{n=i+1}}let i=n-1;return Tf.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length){return this._content.length}else if(e.line<0){return 0}let n=t[e.line];let r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}var Wd;(function(e){const t=Object.prototype.toString;function n(e){return typeof e!=="undefined"}e.defined=n;function r(e){return typeof e==="undefined"}e.undefined=r;function i(e){return e===true||e===false}e.boolean=i;function s(e){return t.call(e)==="[object String]"}e.string=s;function a(e){return t.call(e)==="[object Number]"}e.number=a;function o(e,n,r){return t.call(e)==="[object Number]"&&n<=e&&e<=r}e.numberRange=o;function c(e){return t.call(e)==="[object Number]"&&-2147483648<=e&&e<=2147483647}e.integer=c;function u(e){return t.call(e)==="[object Number]"&&0<=e&&e<=2147483647}e.uinteger=u;function l(e){return t.call(e)==="[object Function]"}e.func=l;function f(e){return e!==null&&typeof e==="object"}e.objectLiteral=f;function d(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=d})(Wd||(Wd={}));class Hd{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(e){this.rootNode=new Qd(e);this.rootNode.root=this.rootNode;this.nodeStack=[this.rootNode];return this.rootNode}buildCompositeNode(e){const t=new Yd;t.grammarSource=e;t.root=this.rootNode;this.current.content.push(t);this.nodeStack.push(t);return t}buildLeafNode(e,t){const n=new qd(e.startOffset,e.image.length,R(e),e.tokenType,false);n.grammarSource=t;n.root=this.rootNode;this.current.content.push(n);return n}removeNode(e){const t=e.container;if(t){const n=t.content.indexOf(e);if(n>=0){t.content.splice(n,1)}}}construct(e){const t=this.current;if(typeof e.$type==="string"){this.current.astNode=e}e.$cstNode=t;const n=this.nodeStack.pop();if((n===null||n===void 0?void 0:n.content.length)===0){this.removeNode(n)}}addHiddenTokens(e){for(const t of e){const e=new qd(t.startOffset,t.image.length,R(t),t.tokenType,true);e.root=this.rootNode;this.addHiddenToken(this.rootNode,e)}}addHiddenToken(e,t){const{offset:n,end:r}=t;for(let i=0;i<e.content.length;i++){const s=e.content[i];const{offset:a,end:o}=s;if(c(s)&&n>a&&r<o){this.addHiddenToken(s,t);return}else if(r<=a){e.content.splice(i,0,t);return}}e.content.push(t)}}class zd{get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return false}get astNode(){var e,t;const n=typeof((e=this._astNode)===null||e===void 0?void 0:e.$type)==="string"?this._astNode:(t=this.container)===null||t===void 0?void 0:t.astNode;if(!n){throw new Error("This node has no associated AST element")}return n}set astNode(e){this._astNode=e}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}}class qd extends zd{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=false){super();this._hidden=i;this._offset=e;this._tokenType=r;this._length=t;this._range=n}}class Yd extends zd{constructor(){super(...arguments);this.content=new Xd(this)}get children(){return this.content}get offset(){var e,t;return(t=(e=this.firstNonHiddenNode)===null||e===void 0?void 0:e.offset)!==null&&t!==void 0?t:0}get length(){return this.end-this.offset}get end(){var e,t;return(t=(e=this.lastNonHiddenNode)===null||e===void 0?void 0:e.end)!==null&&t!==void 0?t:0}get range(){const e=this.firstNonHiddenNode;const t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===undefined){const{range:n}=e;const{range:r}=t;this._rangeCache={start:n.start,end:r.end.line<n.start.line?n.start:r.end}}return this._rangeCache}else{return{start:Tf.create(0,0),end:Tf.create(0,0)}}}get firstNonHiddenNode(){for(const e of this.content){if(!e.hidden){return e}}return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){const t=this.content[e];if(!t.hidden){return t}}return this.content[this.content.length-1]}}class Xd extends Array{constructor(e){super();this.parent=e;Object.setPrototypeOf(this,Xd.prototype)}push(...e){this.addParents(e);return super.push(...e)}unshift(...e){this.addParents(e);return super.unshift(...e)}splice(e,t,...n){this.addParents(n);return super.splice(e,t,...n)}addParents(e){for(const t of e){t.container=this.parent}}}class Qd extends Yd{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super();this._text="";this._text=e!==null&&e!==void 0?e:""}}const Jd=Symbol("Datatype");function Zd(e){return e.$type===Jd}const eh="";const th=e=>e.endsWith(eh)?e:e+eh;class nh{constructor(e){this._unorderedGroups=new Map;this.lexer=e.parser.Lexer;const t=this.lexer.definition;this.wrapper=new ch(t,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class rh extends nh{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e);this.nodeBuilder=new Hd;this.stack=[];this.assignmentMap=new Map;this.linker=e.references.Linker;this.converter=e.parser.ValueConverter;this.astReflection=e.shared.AstReflection}rule(e,t){const n=e.fragment?undefined:Mn(e)?Jd:Bn(e);const r=this.wrapper.DEFINE_RULE(th(e.name),this.startImplementation(n,t).bind(this));if(e.entry){this.mainRule=r}return r}parse(e){this.nodeBuilder.buildRootNode(e);const t=this.lexer.tokenize(e);this.wrapper.input=t.tokens;const n=this.mainRule.call(this.wrapper,{});this.nodeBuilder.addHiddenTokens(t.hidden);this.unorderedGroups.clear();return{value:n,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(e,t){return n=>{if(!this.isRecording()){const t={$type:e};this.stack.push(t);if(e===Jd){t.value=""}}let r;try{r=t(n)}catch(i){r=undefined}if(!this.isRecording()&&r===undefined){r=this.construct()}return r}}consume(e,t,n){const r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){const e=this.nodeBuilder.buildLeafNode(r,n);const{assignment:t,isCrossRef:i}=this.getAssignment(n);const s=this.current;if(t){const s=lt(n)?r.image:this.converter.convert(r.image,e);this.assign(t.operator,t.feature,s,e,i)}else if(Zd(s)){let t=r.image;if(!lt(n)){t=this.converter.convert(t,e).toString()}s.value+=t}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset==="number"&&!isNaN(e.endOffset)}subrule(e,t,n,r){let i;if(!this.isRecording()){i=this.nodeBuilder.buildCompositeNode(n)}const s=this.wrapper.wrapSubrule(e,t,r);if(!this.isRecording()&&i&&i.length>0){this.performSubruleAssignment(s,n,i)}}performSubruleAssignment(e,t,n){const{assignment:r,isCrossRef:i}=this.getAssignment(t);if(r){this.assign(r.operator,r.feature,e,n,i)}else if(!r){const t=this.current;if(Zd(t)){t.value+=e.toString()}else if(typeof e==="object"&&e){const n=e.$type;const r=this.assignWithoutOverride(e,t);if(n){r.$type=n}const i=r;this.stack.pop();this.stack.push(i)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(!n.$cstNode&&t.feature&&t.operator){n=this.construct(false);const e=n.$cstNode.feature;this.nodeBuilder.buildCompositeNode(e)}const r={$type:e};this.stack.pop();this.stack.push(r);if(t.feature&&t.operator){this.assign(t.operator,t.feature,n,n.$cstNode,false)}}}construct(e=true){if(this.isRecording()){return undefined}const t=this.current;Lt(t);this.nodeBuilder.construct(t);if(e){this.stack.pop()}if(Zd(t)){return this.converter.convert(t.value,t.$cstNode)}else{Kt(this.astReflection,t)}return t}getAssignment(e){if(!this.assignmentMap.has(e)){const t=bt(e,et);this.assignmentMap.set(e,{assignment:t,isCrossRef:t?it(t.terminal):false})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){const s=this.current;let a;if(i&&typeof n==="string"){a=this.linker.buildReference(s,t,r,n)}else{a=n}switch(e){case"=":{s[t]=a;break}case"?=":{s[t]=true;break}case"+=":{if(!Array.isArray(s[t])){s[t]=[]}s[t].push(a)}}}assignWithoutOverride(e,t){for(const[n,r]of Object.entries(t)){const t=e[n];if(t===undefined){e[n]=r}else if(Array.isArray(t)&&Array.isArray(r)){r.push(...t);e[n]=r}}return e}get definitionErrors(){return this.wrapper.definitionErrors}}class ih{buildMismatchTokenMessage(e){return io.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return io.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return io.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return io.buildEarlyExitMessage(e)}}class sh extends ih{buildMismatchTokenMessage({expected:e,actual:t}){const n=e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`;return`Expecting ${n} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class ah extends nh{constructor(){super(...arguments);this.tokens=[];this.elementStack=[];this.lastElementStack=[];this.nextTokenIndex=0;this.stackSize=0}action(){}construct(){return undefined}parse(e){this.resetState();const t=this.lexer.tokenize(e);this.tokens=t.tokens;this.wrapper.input=[...this.tokens];this.mainRule.call(this.wrapper,{});this.unorderedGroups.clear();return{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const n=this.wrapper.DEFINE_RULE(th(e.name),this.startImplementation(t).bind(this));if(e.entry){this.mainRule=n}return n}resetState(){this.elementStack=[];this.lastElementStack=[];this.nextTokenIndex=0;this.stackSize=0}startImplementation(e){return t=>{const n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;this.stackSize=e;return e}resetStackSize(e){this.removeUnexpectedElements();this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t);if(!this.isRecording()){this.lastElementStack=[...this.elementStack,n];this.nextTokenIndex=this.currIdx+1}}subrule(e,t,n,r){this.before(n);this.wrapper.wrapSubrule(e,t,r);this.after(n)}before(e){if(!this.isRecording()){this.elementStack.push(e)}}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);if(t>=0){this.elementStack.splice(t)}}}get currIdx(){return this.wrapper.currIdx}}const oh={recoveryEnabled:true,nodeLocationTracking:"full",skipValidations:true,errorMessageProvider:new sh};class ch extends Uu{constructor(e,t){const n=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},oh),{lookaheadStrategy:n?new qc({maxLookahead:t.maxLookahead}):new Kl}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}}function uh(e,t,n){const r=new Map;const i={parser:t,tokens:n,rules:r,ruleNames:new Map};lh(i,e);return t}function lh(e,t){const n=Tn(t,false);const r=g(t.rules).filter(be).filter((e=>n.has(e)));for(const i of r){const t=Object.assign(Object.assign({},e),{consume:1,optional:1,subrule:1,many:1,or:1});t.rules.set(i.name,e.parser.rule(i,fh(t,i.definition)))}}function fh(e,t,n=false){let r;if(lt(t)){r=Eh(e,t)}else if(Xe(t)){r=dh(e,t)}else if(et(t)){r=fh(e,t.terminal)}else if(it(t)){r=vh(e,t)}else if(gt(t)){r=hh(e,t)}else if(Je(t)){r=gh(e,t)}else if(xt(t)){r=yh(e,t)}else if(ct(t)){r=Ah(e,t)}else if(at(t)){const n=e.consume++;r=()=>e.parser.consume(n,to,t)}else{throw new G(t.$cstNode,`Unexpected element type: ${t.$type}`)}return Rh(e,n?undefined:Th(t),r,t.cardinality)}function dh(e,t){const n=Bn(t);return()=>e.parser.action(n,t)}function hh(e,t){const n=t.rule.ref;if(be(n)){const r=e.subrule++;const i=t.arguments.length>0?ph(n,t.arguments):()=>({});return s=>e.parser.subrule(r,kh(e,n),t,i(s))}else if(Ke(n)){const r=e.consume++;const i=Ih(e,n.name);return()=>e.parser.consume(r,i,t)}else if(!n){throw new G(t.$cstNode,`Undefined rule type: ${t.$type}`)}else{B(n)}}function ph(e,t){const n=t.map((e=>mh(e.value)));return t=>{const r={};for(let i=0;i<n.length;i++){const s=e.parameters[i];const a=n[i];r[s.name]=a(t)}return r}}function mh(e){if(de(e)){const t=mh(e.left);const n=mh(e.right);return e=>t(e)||n(e)}else if(le(e)){const t=mh(e.left);const n=mh(e.right);return e=>t(e)&&n(e)}else if(xe(e)){const t=mh(e.value);return e=>!t(e)}else if($e(e)){const t=e.parameter.ref.name;return e=>e!==undefined&&e[t]===true}else if(ce(e)){const t=Boolean(e.true);return()=>t}B(e)}function gh(e,t){if(t.elements.length===1){return fh(e,t.elements[0])}else{const n=[];for(const i of t.elements){const t={ALT:fh(e,i,true)};const r=Th(i);if(r){t.GATE=mh(r)}n.push(t)}const r=e.or++;return t=>e.parser.alternatives(r,n.map((e=>{const n={ALT:()=>e.ALT(t)};const r=e.GATE;if(r){n.GATE=()=>r(t)}return n})))}}function yh(e,t){if(t.elements.length===1){return fh(e,t.elements[0])}const n=[];for(const o of t.elements){const t={ALT:fh(e,o,true)};const r=Th(o);if(r){t.GATE=mh(r)}n.push(t)}const r=e.or++;const i=(e,t)=>{const n=t.getRuleStack().join("-");return`uGroup_${e}_${n}`};const s=t=>e.parser.alternatives(r,n.map(((n,s)=>{const a={ALT:()=>true};const o=e.parser;a.ALT=()=>{n.ALT(t);if(!o.isRecording()){const e=i(r,o);if(!o.unorderedGroups.get(e)){o.unorderedGroups.set(e,[])}const t=o.unorderedGroups.get(e);if(typeof(t===null||t===void 0?void 0:t[s])==="undefined"){t[s]=true}}};const c=n.GATE;if(c){a.GATE=()=>c(t)}else{a.GATE=()=>{const e=o.unorderedGroups.get(i(r,o));const t=!(e===null||e===void 0?void 0:e[s]);return t}}return a})));const a=Rh(e,Th(t),s,"*");return t=>{a(t);if(!e.parser.isRecording()){e.parser.unorderedGroups.delete(i(r,e.parser))}}}function Ah(e,t){const n=t.elements.map((t=>fh(e,t)));return e=>n.forEach((t=>t(e)))}function Th(e){if(ct(e)){return e.guardCondition}return undefined}function vh(e,t,n=t.terminal){if(!n){if(!t.type.ref){throw new Error("Could not resolve reference to type: "+t.type.$refText)}const n=$n(t.type.ref);const r=n===null||n===void 0?void 0:n.terminal;if(!r){throw new Error("Could not find name assignment for type: "+Bn(t.type.ref))}return vh(e,t,r)}else if(gt(n)&&be(n.rule.ref)){const r=e.subrule++;return i=>e.parser.subrule(r,kh(e,n.rule.ref),t,i)}else if(gt(n)&&Ke(n.rule.ref)){const r=e.consume++;const i=Ih(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}else if(lt(n)){const r=e.consume++;const i=Ih(e,n.value);return()=>e.parser.consume(r,i,t)}else{throw new Error("Could not build cross reference parser")}}function Eh(e,t){const n=e.consume++;const r=e.tokens[t.value];if(!r){throw new Error("Could not find token for keyword: "+t.value)}return()=>e.parser.consume(n,r,t)}function Rh(e,t,n,r){const i=t&&mh(t);if(!r){if(i){const t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:Pu(),GATE:()=>!i(r)}])}else{return n}}if(r==="*"){const t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):undefined})}else if(r==="+"){const t=e.many++;if(i){const r=e.or++;return s=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(s)}),GATE:()=>i(s)},{ALT:Pu(),GATE:()=>!i(s)}])}else{return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}}else if(r==="?"){const t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):undefined})}else{B(r)}}function kh(e,t){const n=xh(e,t);const r=e.rules.get(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function xh(e,t){if(be(t)){return t.name}else if(e.ruleNames.has(t)){return e.ruleNames.get(t)}else{let n=t;let r=n.$container;let i=t.$type;while(!be(r)){if(ct(r)||Je(r)||xt(r)){const e=r.elements.indexOf(n);i=e.toString()+":"+i}n=r;r=r.$container}const s=r;i=s.name+":"+i;e.ruleNames.set(t,i);return i}}function Ih(e,t){const n=e.tokens[t];if(!n)throw new Error(`Token "${t}" not found."`);return n}function Sh(e){const t=e.Grammar;const n=e.parser.Lexer;const r=new ah(e);uh(t,r,n.definition);r.finalize();return r}function wh(e){const t=Nh(e);t.finalize();return t}function Nh(e){const t=e.Grammar;const n=e.parser.Lexer;const r=new rh(e);return uh(t,r,n.definition)}class Ch{buildTokens(e,t){const n=g(Tn(e,false));const r=this.buildTerminalTokens(n);const i=this.buildKeywordTokens(n,r,t);r.forEach((e=>{const t=e.PATTERN;if(typeof t==="object"&&t&&"test"in t&&dn(t)){i.unshift(e)}else{i.push(e)}}));return i}buildTerminalTokens(e){return e.filter(Ke).filter((e=>!e.fragment)).map((e=>this.buildTerminalToken(e))).toArray()}buildTerminalToken(e){const t=Vn(e);const n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t;const r={name:e.name,PATTERN:n,LINE_BREAKS:true};if(e.hidden){r.GROUP=dn(t)?Ga.SKIPPED:"hidden"}return r}requiresCustomPattern(e){if(e.flags.includes("u")){return true}else if(e.source.includes("?<=")||e.source.includes("?<!")){return true}else{return false}}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(e,n)=>{t.lastIndex=n;const r=t.exec(e);return r}}buildKeywordTokens(e,t,n){return e.filter(be).flatMap((e=>Dt(e).filter(lt))).distinct((e=>e.value)).toArray().sort(((e,t)=>t.value.length-e.value.length)).map((e=>this.buildKeywordToken(e,t,Boolean(n===null||n===void 0?void 0:n.caseInsensitive))))}buildKeywordToken(e,t,n){return{name:e.value,PATTERN:this.buildKeywordPattern(e,n),LONGER_ALT:this.findLongerAlt(e,t)}}buildKeywordPattern(e,t){return t?new RegExp(pn(e.value)):e.value}findLongerAlt(e,t){return t.reduce(((t,n)=>{const r=n===null||n===void 0?void 0:n.PATTERN;if((r===null||r===void 0?void 0:r.source)&&mn("^"+r.source+"$",e.value)){t.push(n)}return t}),[])}}class $h{convert(e,t){let n=t.grammarSource;if(it(n)){n=En(n)}if(gt(n)){const r=n.rule.ref;if(!r){throw new Error("This cst node was not parsed by a rule.")}return this.runConverter(r,e,t)}return e}runConverter(e,t,n){var r;switch(e.name.toUpperCase()){case"INT":return Lh.convertInt(t);case"STRING":return Lh.convertString(t);case"ID":return Lh.convertID(t)}switch((r=jn(e))===null||r===void 0?void 0:r.toLowerCase()){case"number":return Lh.convertNumber(t);case"boolean":return Lh.convertBoolean(t);case"bigint":return Lh.convertBigint(t);case"date":return Lh.convertDate(t);default:return t}}}var Lh;(function(e){function t(e){let t="";for(let r=1;r<e.length-1;r++){const i=e.charAt(r);if(i==="\\"){const i=e.charAt(++r);t+=n(i)}else{t+=i}}return t}e.convertString=t;function n(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}function r(e){if(e.charAt(0)==="^"){return e.substring(1)}else{return e}}e.convertID=r;function i(e){return parseInt(e)}e.convertInt=i;function s(e){return BigInt(e)}e.convertBigint=s;function a(e){return new Date(e)}e.convertDate=a;function o(e){return Number(e)}e.convertNumber=o;function c(e){return e.toLowerCase()==="true"}e.convertBoolean=c})(Lh||(Lh={}));var bh=n(59850);function _h(){return new Promise((e=>{if(typeof setImmediate==="undefined"){setTimeout(e,0)}else{setImmediate(e)}}))}let Oh=0;let Ph=10;function Mh(){Oh=Date.now();return new CancellationTokenSource}function Dh(e){Ph=e}const Uh=Symbol("OperationCancelled");function Fh(e){return e===Uh}async function Gh(e){if(e===bh.CancellationToken.None){return}const t=Date.now();if(t-Oh>=Ph){Oh=t;await _h()}if(e.isCancellationRequested){throw Uh}}class Bh{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>{e(t);return this};this.reject=e=>{t(e);return this}}))}}class Kh{constructor(e,t,n,r){this._uri=e;this._languageId=t;this._version=n;this._content=r;this._lineOffsets=undefined}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start);const n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const n of e){if(Kh.isIncremental(n)){const e=zh(n.range);const t=this.offsetAt(e.start);const r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0);const s=Math.max(e.end.line,0);let a=this._lineOffsets;const o=Wh(n.text,false,t);if(s-i===o.length){for(let e=0,t=o.length;e<t;e++){a[e+i+1]=o[e]}}else{if(o.length<1e4){a.splice(i+1,s-i,...o)}else{this._lineOffsets=a=a.slice(0,i+1).concat(o,a.slice(s+1))}}const c=n.text.length-(r-t);if(c!==0){for(let e=i+1+o.length,t=a.length;e<t;e++){a[e]=a[e]+c}}}else if(Kh.isFull(n)){this._content=n.text;this._lineOffsets=undefined}else{throw new Error("Unknown change event received")}}this._version=t}getLineOffsets(){if(this._lineOffsets===undefined){this._lineOffsets=Wh(this._content,true)}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(r===0){return{line:0,character:e}}while(n<r){const i=Math.floor((n+r)/2);if(t[i]>e){r=i}else{n=i+1}}const i=n-1;e=this.ensureBeforeEOL(e,t[i]);return{line:i,character:e-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length){return this._content.length}else if(e.line<0){return 0}const n=t[e.line];if(e.character<=0){return n}const r=e.line+1<t.length?t[e.line+1]:this._content.length;const i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){while(e>t&&Hh(this._content.charCodeAt(e-1))){e--}return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return t!==undefined&&t!==null&&typeof t.text==="string"&&t.range!==undefined&&(t.rangeLength===undefined||typeof t.rangeLength==="number")}static isFull(e){const t=e;return t!==undefined&&t!==null&&typeof t.text==="string"&&t.range===undefined&&t.rangeLength===undefined}}var jh;(function(e){function t(e,t,n,r){return new Kh(e,t,n,r)}e.create=t;function n(e,t,n){if(e instanceof Kh){e.update(t,n);return e}else{throw new Error("TextDocument.update: document must be created by TextDocument.create")}}e.update=n;function r(e,t){const n=e.getText();const r=Vh(t.map(qh),((e,t)=>{const n=e.range.start.line-t.range.start.line;if(n===0){return e.range.start.character-t.range.start.character}return n}));let i=0;const s=[];for(const a of r){const t=e.offsetAt(a.range.start);if(t<i){throw new Error("Overlapping edit")}else if(t>i){s.push(n.substring(i,t))}if(a.newText.length){s.push(a.newText)}i=e.offsetAt(a.range.end)}s.push(n.substr(i));return s.join("")}e.applyEdits=r})(jh||(jh={}));function Vh(e,t){if(e.length<=1){return e}const n=e.length/2|0;const r=e.slice(0,n);const i=e.slice(n);Vh(r,t);Vh(i,t);let s=0;let a=0;let o=0;while(s<r.length&&a<i.length){const n=t(r[s],i[a]);if(n<=0){e[o++]=r[s++]}else{e[o++]=i[a++]}}while(s<r.length){e[o++]=r[s++]}while(a<i.length){e[o++]=i[a++]}return e}function Wh(e,t,n=0){const r=t?[n]:[];for(let i=0;i<e.length;i++){const t=e.charCodeAt(i);if(Hh(t)){if(t===13&&i+1<e.length&&e.charCodeAt(i+1)===10){i++}r.push(n+i+1)}}return r}function Hh(e){return e===13||e===10}function zh(e){const t=e.start;const n=e.end;if(t.line>n.line||t.line===n.line&&t.character>n.character){return{start:n,end:t}}return e}function qh(e){const t=zh(e.range);if(t!==e.range){return{newText:e.newText,range:t}}return e}var Yh=n(65606);var Xh;(()=>{"use strict";var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,a=0,o=0;o<=e.length;++o){if(o<e.length)n=e.charCodeAt(o);else{if(47===n)break;n=47}if(47===n){if(s===o-1||1===a);else if(s!==o-1&&2===a){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=o,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=o,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,o):r=e.slice(s+1,o),i=o-s-1;s=o,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=Yh.cwd()),a=e),t(a),0!==a.length&&(r=a+"/"+r,i=47===a.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var s=e.length,a=s-i,o=1;o<n.length&&47===n.charCodeAt(o);++o);for(var c=n.length-o,u=a<c?a:c,l=-1,f=0;f<=u;++f){if(f===u){if(c>u){if(47===n.charCodeAt(o+f))return n.slice(o+f+1);if(0===f)return n.slice(o+f)}else a>u&&(47===e.charCodeAt(i+f)?l=f:0===f&&(l=0));break}var d=e.charCodeAt(i+f);if(d!==n.charCodeAt(o+f))break;47===d&&(l=f)}var h="";for(f=i+l+1;f<=s;++f)f!==s&&47!==e.charCodeAt(f)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(o+l):(o+=l,47===n.charCodeAt(o)&&++o,n.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,a=e.length-1;a>=1;--a)if(47===(n=e.charCodeAt(a))){if(!s){i=a;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var o=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!a){i=r+1;break}}else-1===c&&(a=!1,c=r+1),o>=0&&(u===n.charCodeAt(o)?-1==--o&&(s=r):(o=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){i=r+1;break}}else-1===s&&(a=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,a=0,o=e.length-1;o>=0;--o){var c=e.charCodeAt(o);if(47!==c)-1===i&&(s=!1,i=o+1),46===c?-1===n?n=o:1!==a&&(a=1):-1!==n&&(a=-1);else if(!s){r=o+1;break}}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var a=-1,o=0,c=-1,u=!0,l=e.length-1,f=0;l>=r;--l)if(47!==(i=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===i?-1===a?a=l:1!==f&&(f=1):-1!==a&&(f=-1);else if(!u){o=l+1;break}return-1===a||-1===c||0===f||1===f&&a===c-1&&a===o+1?-1!==c&&(n.base=n.name=0===o&&s?e.slice(1,c):e.slice(o,c)):(0===o&&s?(n.name=e.slice(1,a),n.base=e.slice(1,c)):(n.name=e.slice(o,a),n.base=e.slice(o,c)),n.ext=e.slice(a,c)),o>0?n.dir=e.slice(0,o-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>l,Utils:()=>x}),"object"==typeof Yh)e="win32"===Yh.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function a(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const o="",c="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class l{static isUri(e){return e instanceof l||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||o,this.authority=e.authority||o,this.path=e.path||o,this.query=e.query||o,this.fragment=e.fragment||o):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||o,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||o),this.query=r||o,this.fragment=i||o,a(this,s))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=o),void 0===n?n=this.authority:null===n&&(n=o),void 0===r?r=this.path:null===r&&(r=o),void 0===i?i=this.query:null===i&&(i=o),void 0===s?s=this.fragment:null===s&&(s=o),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new d(t,n,r,i,s)}static parse(e,t=!1){const n=u.exec(e);return n?new d(n[2]||o,v(n[4]||o),v(n[5]||o),v(n[7]||o),v(n[9]||o),t):new d(o,o,o,o,o)}static file(t){let n=o;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(n=t.substring(2),t=c):(n=t.substring(2,e),t=t.substring(e)||c)}return new d("file",n,t,o,o)}static from(e){const t=new d(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof l)return e;{const t=new d(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}const f=e?1:void 0;class d extends l{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const h={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function p(e,t,n){let r,i=-1;for(let s=0;s<e.length;s++){const a=e.charCodeAt(s);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||t&&47===a||n&&91===a||n&&93===a||n&&58===a)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=h[a];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function m(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=h[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function g(t,n){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function y(e,t){const n=t?m:p;let r="",{scheme:i,authority:s,path:a,query:o,fragment:u}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=c,r+=c),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){const e=a.charCodeAt(1);e>=65&&e<=90&&(a=`/${String.fromCharCode(e+32)}:${a.substr(3)}`)}else if(a.length>=2&&58===a.charCodeAt(1)){const e=a.charCodeAt(0);e>=65&&e<=90&&(a=`${String.fromCharCode(e+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),u&&(r+="#",r+=t?u:p(u,!1,!1)),r}function A(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+A(e.substr(3)):e}}const T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(T)?e.replace(T,(e=>A(e))):e}var E=n(470);const R=E.posix||E,k="/";var x;!function(e){e.joinPath=function(e,...t){return e.with({path:R.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==k&&(n=k+n,r=!0);let i=R.resolve(n,...t);return r&&i[0]===k&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===k)return e;let t=R.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return R.basename(e.path)},e.extname=function(e){return R.extname(e.path)}}(x||(x={}))})(),Xh=r})();const{URI:Qh,Utils:Jh}=Xh;var Zh;(function(e){e.basename=Jh.basename;e.dirname=Jh.dirname;e.extname=Jh.extname;e.joinPath=Jh.joinPath;e.resolvePath=Jh.resolvePath;function t(e,t){return(e===null||e===void 0?void 0:e.toString())===(t===null||t===void 0?void 0:t.toString())}e.equals=t;function n(e,t){const n=typeof e==="string"?e:e.path;const r=typeof t==="string"?t:t.path;const i=n.split("/").filter((e=>e.length>0));const s=r.split("/").filter((e=>e.length>0));let a=0;for(;a<i.length;a++){if(i[a]!==s[a]){break}}const o="../".repeat(i.length-a);const c=s.slice(a).join("/");return o+c}e.relative=n})(Zh||(Zh={}));var ep;(function(e){e[e["Changed"]=0]="Changed";e[e["Parsed"]=1]="Parsed";e[e["IndexedContent"]=2]="IndexedContent";e[e["ComputedScopes"]=3]="ComputedScopes";e[e["Linked"]=4]="Linked";e[e["IndexedReferences"]=5]="IndexedReferences";e[e["Validated"]=6]="Validated"})(ep||(ep={}));class tp{constructor(e){this.serviceRegistry=e.ServiceRegistry;this.textDocuments=e.workspace.TextDocuments;this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=bh.CancellationToken.None){const n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){t=t!==null&&t!==void 0?t:Qh.parse(e.uri);if(n){return this.createAsync(t,e,n)}else{return this.create(t,e)}}fromString(e,t,n){if(n){return this.createAsync(t,e,n)}else{return this.create(t,e)}}fromModel(e,t){return this.create(t,{$model:e})}create(e,t){if(typeof t==="string"){const n=this.parse(e,t);return this.createLangiumDocument(n,e,undefined,t)}else if("$model"in t){const n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{const n=this.parse(e,t.getText());return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,n){if(typeof t==="string"){const r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,undefined,t)}else{const r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n){i={parseResult:e,uri:t,state:ep.Parsed,references:[],textDocument:n}}else{const n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:ep.Parsed,references:[],get textDocument(){return n()}}}e.value.$document=i;return i}async update(e,t){var n,r;const i=(n=e.parseResult.value.$cstNode)===null||n===void 0?void 0:n.root.fullText;const s=(r=this.textDocuments)===null||r===void 0?void 0:r.get(e.uri.toString());const a=s?s.getText():await this.fileSystemProvider.readFile(e.uri);if(s){Object.defineProperty(e,"textDocument",{value:s})}else{const t=this.createTextDocumentGetter(e.uri,a);Object.defineProperty(e,"textDocument",{get:t})}if(i!==a){e.parseResult=await this.parseAsync(e.uri,a,t);e.parseResult.value.$document=e}e.state=ep.Parsed;return e}parse(e,t){const n=this.serviceRegistry.getServices(e);return n.parser.LangiumParser.parse(t)}parseAsync(e,t,n){const r=this.serviceRegistry.getServices(e);return r.parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){const n=this.serviceRegistry;let r=undefined;return()=>r!==null&&r!==void 0?r:r=jh.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t!==null&&t!==void 0?t:"")}}class np{constructor(e){this.documentMap=new Map;this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return g(this.documentMap.values())}addDocument(e){const t=e.uri.toString();if(this.documentMap.has(t)){throw new Error(`A document with the URI '${t}' is already present.`)}this.documentMap.set(t,e)}getDocument(e){const t=e.toString();return this.documentMap.get(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);if(n){return n}n=await this.langiumDocumentFactory.fromUri(e,t);this.addDocument(n);return n}createDocument(e,t,n){if(n){return this.langiumDocumentFactory.fromString(t,e,n).then((e=>{this.addDocument(e);return e}))}else{const n=this.langiumDocumentFactory.fromString(t,e);this.addDocument(n);return n}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const t=e.toString();const n=this.documentMap.get(t);if(n){n.state=ep.Changed;n.precomputedScopes=undefined;n.references=[];n.diagnostics=undefined}return n}deleteDocument(e){const t=e.toString();const n=this.documentMap.get(t);if(n){n.state=ep.Changed;this.documentMap.delete(t)}return n}}class rp{constructor(e){this.reflection=e.shared.AstReflection;this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments;this.scopeProvider=e.references.ScopeProvider;this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,t=bh.CancellationToken.None){for(const n of Ut(e.parseResult.value)){await Gh(t);Gt(n).forEach((t=>this.doLink(t,e)))}}doLink(e,t){const n=e.reference;if(n._ref===undefined){try{const t=this.getCandidate(e);if(a(t)){n._ref=t}else{n._nodeDescription=t;if(this.langiumDocuments().hasDocument(t.documentUri)){const r=this.loadAstNode(t);n._ref=r!==null&&r!==void 0?r:this.createLinkingError(e,t)}}}catch(r){n._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${n.$refText}': ${r}`})}}t.references.push(n)}unlink(e){for(const t of e.references){delete t._ref;delete t._nodeDescription}e.references=[]}getCandidate(e){const t=this.scopeProvider.getScope(e);const n=t.getElement(e.reference.$refText);return n!==null&&n!==void 0?n:this.createLinkingError(e)}buildReference(e,t,n,i){const o=this;const c={$refNode:n,$refText:i,get ref(){var n;if(r(this._ref)){return this._ref}else if(s(this._nodeDescription)){const n=o.loadAstNode(this._nodeDescription);this._ref=n!==null&&n!==void 0?n:o.createLinkingError({reference:c,container:e,property:t},this._nodeDescription)}else if(this._ref===undefined){const r=o.getLinkedNode({reference:c,container:e,property:t});if(r.error&&Ot(e).state<ep.ComputedScopes){return undefined}this._ref=(n=r.node)!==null&&n!==void 0?n:r.error;this._nodeDescription=r.descr}return r(this._ref)?this._ref:undefined},get $nodeDescription(){return this._nodeDescription},get error(){return a(this._ref)?this._ref:undefined}};return c}getLinkedNode(e){try{const t=this.getCandidate(e);if(a(t)){return{error:t}}const n=this.loadAstNode(t);if(n){return{node:n,descr:t}}else{return{descr:t,error:this.createLinkingError(e,t)}}}catch(t){return{error:Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${e.reference.$refText}': ${t}`})}}}loadAstNode(e){if(e.node){return e.node}const t=this.langiumDocuments().getDocument(e.documentUri);if(!t){return undefined}return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){const n=Ot(e.container);if(n.state<ep.ComputedScopes){console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`)}const r=this.reflection.getReferenceType(e);return Object.assign(Object.assign({},e),{message:`Could not resolve reference to ${r} named '${e.reference.$refText}'.`,targetDescription:t})}}function ip(e){return typeof e.name==="string"}class sp{getName(e){if(ip(e)){return e.name}return undefined}getNameNode(e){return xn(e.$cstNode,"name")}}class ap{constructor(e){this.nameProvider=e.references.NameProvider;this.index=e.shared.workspace.IndexManager;this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){const t=Cn(e);const n=e.astNode;if(t&&n){const r=n[t.feature];if(i(r)){return r.ref}else if(Array.isArray(r)){for(const t of r){if(i(t)&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end){return t.ref}}}}if(n){const t=this.nameProvider.getNameNode(n);if(t&&(t===e||E(e,t))){return n}}}return undefined}findDeclarationNode(e){const t=this.findDeclaration(e);if(t===null||t===void 0?void 0:t.$cstNode){const e=this.nameProvider.getNameNode(t);return e!==null&&e!==void 0?e:t.$cstNode}return undefined}findReferences(e,t){const n=[];if(t.includeDeclaration){const t=this.getReferenceToSelf(e);if(t){n.push(t)}}let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));if(t.documentUri){r=r.filter((e=>Zh.equals(e.sourceUri,t.documentUri)))}n.push(...r);return g(n)}getReferenceToSelf(e){const t=this.nameProvider.getNameNode(e);if(t){const n=Ot(e);const r=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:r,targetUri:n.uri,targetPath:r,segment:k(t),local:true}}return undefined}}class op{constructor(e){this.map=new Map;if(e){for(const[t,n]of e){this.add(t,n)}}}get size(){return A.sum(g(this.map.values()).map((e=>e.length)))}clear(){this.map.clear()}delete(e,t){if(t===undefined){return this.map.delete(e)}else{const n=this.map.get(e);if(n){const r=n.indexOf(t);if(r>=0){if(n.length===1){this.map.delete(e)}else{n.splice(r,1)}return true}}return false}}get(e){var t;return(t=this.map.get(e))!==null&&t!==void 0?t:[]}has(e,t){if(t===undefined){return this.map.has(e)}else{const n=this.map.get(e);if(n){return n.indexOf(t)>=0}return false}}add(e,t){if(this.map.has(e)){this.map.get(e).push(t)}else{this.map.set(e,[t])}return this}addAll(e,t){if(this.map.has(e)){this.map.get(e).push(...t)}else{this.map.set(e,Array.from(t))}return this}forEach(e){this.map.forEach(((t,n)=>t.forEach((t=>e(t,n,this)))))}[Symbol.iterator](){return this.entries().iterator()}entries(){return g(this.map.entries()).flatMap((([e,t])=>t.map((t=>[e,t]))))}keys(){return g(this.map.keys())}values(){return g(this.map.values()).flat()}entriesGroupedByKey(){return g(this.map.entries())}}class cp{get size(){return this.map.size}constructor(e){this.map=new Map;this.inverse=new Map;if(e){for(const[t,n]of e){this.set(t,n)}}}clear(){this.map.clear();this.inverse.clear()}set(e,t){this.map.set(e,t);this.inverse.set(t,e);return this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);if(t!==undefined){this.map.delete(e);this.inverse.delete(t);return true}return false}}class up{constructor(e){this.nameProvider=e.references.NameProvider;this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=bh.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,undefined,t)}async computeExportsForNode(e,t,n=Mt,r=bh.CancellationToken.None){const i=[];this.exportNode(e,i,t);for(const s of n(e)){await Gh(r);this.exportNode(s,i,t)}return i}exportNode(e,t,n){const r=this.nameProvider.getName(e);if(r){t.push(this.descriptions.createDescription(e,r,n))}}async computeLocalScopes(e,t=bh.CancellationToken.None){const n=e.parseResult.value;const r=new op;for(const i of Dt(n)){await Gh(t);this.processNode(i,e,r)}return r}processNode(e,t,n){const r=e.$container;if(r){const i=this.nameProvider.getName(e);if(i){n.add(r,this.descriptions.createDescription(e,i,t))}}}}class lp{constructor(e,t,n){var r;this.elements=e;this.outerScope=t;this.caseInsensitive=(r=n===null||n===void 0?void 0:n.caseInsensitive)!==null&&r!==void 0?r:false}getAllElements(){if(this.outerScope){return this.elements.concat(this.outerScope.getAllElements())}else{return this.elements}}getElement(e){const t=this.caseInsensitive?this.elements.find((t=>t.name.toLowerCase()===e.toLowerCase())):this.elements.find((t=>t.name===e));if(t){return t}if(this.outerScope){return this.outerScope.getElement(e)}return undefined}}class fp{constructor(e,t,n){var r;this.elements=new Map;this.caseInsensitive=(r=n===null||n===void 0?void 0:n.caseInsensitive)!==null&&r!==void 0?r:false;for(const i of e){const e=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(e,i)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;const n=this.elements.get(t);if(n){return n}if(this.outerScope){return this.outerScope.getElement(e)}return undefined}getAllElements(){let e=g(this.elements.values());if(this.outerScope){e=e.concat(this.outerScope.getAllElements())}return e}}const dp={getElement(){return undefined},getAllElements(){return p}};class hp{constructor(){this.toDispose=[];this.isDisposed=false}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed();this.clear();this.isDisposed=true;this.toDispose.forEach((e=>e.dispose()))}throwIfDisposed(){if(this.isDisposed){throw new Error("This cache has already been disposed")}}}class pp extends hp{constructor(){super(...arguments);this.cache=new Map}has(e){this.throwIfDisposed();return this.cache.has(e)}set(e,t){this.throwIfDisposed();this.cache.set(e,t)}get(e,t){this.throwIfDisposed();if(this.cache.has(e)){return this.cache.get(e)}else if(t){const n=t();this.cache.set(e,n);return n}else{return undefined}}delete(e){this.throwIfDisposed();return this.cache.delete(e)}clear(){this.throwIfDisposed();this.cache.clear()}}class mp extends hp{constructor(e){super();this.cache=new Map;this.converter=e!==null&&e!==void 0?e:e=>e}has(e,t){this.throwIfDisposed();return this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed();this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();const r=this.cacheForContext(e);if(r.has(t)){return r.get(t)}else if(n){const e=n();r.set(t,e);return e}else{return undefined}}delete(e,t){this.throwIfDisposed();return this.cacheForContext(e).delete(t)}clear(e){this.throwIfDisposed();if(e){const t=this.converter(e);this.cache.delete(t)}else{this.cache.clear()}}cacheForContext(e){const t=this.converter(e);let n=this.cache.get(t);if(!n){n=new Map;this.cache.set(t,n)}return n}}class gp extends mp{constructor(e){super((e=>e.toString()));this.onDispose(e.workspace.DocumentBuilder.onUpdate(((e,t)=>{const n=e.concat(t);for(const r of n){this.clear(r)}})))}}class yp extends pp{constructor(e){super();this.onDispose(e.workspace.DocumentBuilder.onUpdate((()=>{this.clear()})))}}class Ap{constructor(e){this.reflection=e.shared.AstReflection;this.nameProvider=e.references.NameProvider;this.descriptions=e.workspace.AstNodeDescriptionProvider;this.indexManager=e.shared.workspace.IndexManager;this.globalScopeCache=new yp(e.shared)}getScope(e){const t=[];const n=this.reflection.getReferenceType(e);const r=Ot(e.container).precomputedScopes;if(r){let i=e.container;do{const e=r.get(i);if(e.length>0){t.push(g(e).filter((e=>this.reflection.isSubtype(e.type,n))))}i=i.$container}while(i)}let i=this.getGlobalScope(n,e);for(let s=t.length-1;s>=0;s--){i=this.createScope(t[s],i)}return i}createScope(e,t,n){return new lp(g(e),t,n)}createScopeForNodes(e,t,n){const r=g(e).map((e=>{const t=this.nameProvider.getName(e);if(t){return this.descriptions.createDescription(e,t)}return undefined})).nonNullable();return new lp(r,t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,(()=>new fp(this.indexManager.allElements(e))))}}function Tp(e){return typeof e.$comment==="string"}function vp(e){return typeof e==="object"&&!!e&&("$ref"in e||"$error"in e)}class Ep{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]);this.langiumDocuments=e.shared.workspace.LangiumDocuments;this.astNodeLocator=e.workspace.AstNodeLocator;this.nameProvider=e.references.NameProvider;this.commentProvider=e.documentation.CommentProvider}serialize(e,t={}){const n=t===null||t===void 0?void 0:t.replacer;const r=(e,n)=>this.replacer(e,n,t);const i=n?(e,t)=>n(e,t,r):r;try{this.currentDocument=Ot(e);return JSON.stringify(e,i,t===null||t===void 0?void 0:t.space)}finally{this.currentDocument=undefined}}deserialize(e,t={}){const n=JSON.parse(e);this.linkNode(n,n,t);return n}replacer(e,t,{refText:n,sourceText:s,textRegions:a,comments:o,uriConverter:c}){var u,l,f,d;if(this.ignoreProperties.has(e)){return undefined}else if(i(t)){const e=t.ref;const r=n?t.$refText:undefined;if(e){const n=Ot(e);let i="";if(this.currentDocument&&this.currentDocument!==n){if(c){i=c(n.uri,t)}else{i=n.uri.toString()}}const s=this.astNodeLocator.getAstNodePath(e);return{$ref:`${i}#${s}`,$refText:r}}else{return{$error:(l=(u=t.error)===null||u===void 0?void 0:u.message)!==null&&l!==void 0?l:"Could not resolve reference",$refText:r}}}else if(r(t)){let n=undefined;if(a){n=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},t));if((!e||t.$document)&&(n===null||n===void 0?void 0:n.$textRegion)){n.$textRegion.documentURI=(f=this.currentDocument)===null||f===void 0?void 0:f.uri.toString()}}if(s&&!e){n!==null&&n!==void 0?n:n=Object.assign({},t);n.$sourceText=(d=t.$cstNode)===null||d===void 0?void 0:d.text}if(o){n!==null&&n!==void 0?n:n=Object.assign({},t);const e=this.commentProvider.getComment(t);if(e){n.$comment=e.replace(/\r/g,"")}}return n!==null&&n!==void 0?n:t}else{return t}}addAstNodeRegionWithAssignmentsTo(e){const t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){const n=e.$textRegion=t(e.$cstNode);const r=n.assignments={};Object.keys(e).filter((e=>!e.startsWith("$"))).forEach((n=>{const i=kn(e.$cstNode,n).map(t);if(i.length!==0){r[n]=i}}));return e}return undefined}linkNode(e,t,n,i,s,a){for(const[c,u]of Object.entries(e)){if(Array.isArray(u)){for(let i=0;i<u.length;i++){const s=u[i];if(vp(s)){u[i]=this.reviveReference(e,c,t,s,n)}else if(r(s)){this.linkNode(s,t,n,e,c,i)}}}else if(vp(u)){e[c]=this.reviveReference(e,c,t,u,n)}else if(r(u)){this.linkNode(u,t,n,e,c)}}const o=e;o.$container=i;o.$containerProperty=s;o.$containerIndex=a}reviveReference(e,t,n,i,s){let a=i.$refText;let o=i.$error;if(i.$ref){const e=this.getRefNode(n,i.$ref,s.uriConverter);if(r(e)){if(!a){a=this.nameProvider.getName(e)}return{$refText:a!==null&&a!==void 0?a:"",ref:e}}else{o=e}}if(o){const n={$refText:a!==null&&a!==void 0?a:""};n.error={container:e,property:t,message:o,reference:n};return n}else{return undefined}}getRefNode(e,t,n){try{const r=t.indexOf("#");if(r===0){const n=this.astNodeLocator.getAstNode(e,t.substring(1));if(!n){return"Could not resolve path: "+t}return n}if(r<0){const e=n?n(t):Qh.parse(t);const r=this.langiumDocuments.getDocument(e);if(!r){return"Could not find document for URI: "+t}return r.parseResult.value}const i=n?n(t.substring(0,r)):Qh.parse(t.substring(0,r));const s=this.langiumDocuments.getDocument(i);if(!s){return"Could not find document for URI: "+t}if(r===t.length-1){return s.parseResult.value}const a=this.astNodeLocator.getAstNode(s.parseResult.value,t.substring(r+1));if(!a){return"Could not resolve URI: "+t}return a}catch(r){return String(r)}}}class Rp{register(e){if(!this.singleton&&!this.map){this.singleton=e;return}if(!this.map){this.map={};if(this.singleton){for(const e of this.singleton.LanguageMetaData.fileExtensions){this.map[e]=this.singleton}this.singleton=undefined}}for(const t of e.LanguageMetaData.fileExtensions){if(this.map[t]!==undefined&&this.map[t]!==e){console.warn(`The file extension ${t} is used by multiple languages. It is now assigned to '${e.LanguageMetaData.languageId}'.`)}this.map[t]=e}}getServices(e){if(this.singleton!==undefined){return this.singleton}if(this.map===undefined){throw new Error("The service registry is empty. Use `register` to register the services of a language.")}const t=Zh.extname(e);const n=this.map[t];if(!n){throw new Error(`The service registry contains no services for the extension '${t}'.`)}return n}get all(){if(this.singleton!==undefined){return[this.singleton]}if(this.map!==undefined){return Object.values(this.map)}return[]}}function kp(e){return{code:e}}var xp;(function(e){e.all=["fast","slow","built-in"]})(xp||(xp={}));class Ip{constructor(e){this.entries=new op;this.reflection=e.shared.AstReflection}register(e,t=this,n="fast"){if(n==="built-in"){throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.")}for(const[r,i]of Object.entries(e)){const e=i;if(Array.isArray(e)){for(const i of e){const e={check:this.wrapValidationException(i,t),category:n};this.addEntry(r,e)}}else if(typeof e==="function"){const i={check:this.wrapValidationException(e,t),category:n};this.addEntry(r,i)}}}wrapValidationException(e,t){return async(n,r,i)=>{try{await e.call(t,n,r,i)}catch(s){if(Fh(s)){throw s}console.error("An error occurred during validation:",s);const e=s instanceof Error?s.message:String(s);if(s instanceof Error&&s.stack){console.error(s.stack)}r("error","An error occurred during validation: "+e,{node:n})}}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(const n of this.reflection.getAllSubTypes(e)){this.entries.add(n,t)}}getChecks(e,t){let n=g(this.entries.get(e)).concat(this.entries.get("AstNode"));if(t){n=n.filter((e=>t.includes(e.category)))}return n.map((e=>e.check))}}class Sp{constructor(e){this.validationRegistry=e.validation.ValidationRegistry;this.metadata=e.LanguageMetaData}async validateDocument(e,t={},n=bh.CancellationToken.None){const r=e.parseResult;const i=[];await Gh(n);if(!t.categories||t.categories.includes("built-in")){this.processLexingErrors(r,i,t);if(t.stopAfterLexingErrors&&i.some((e=>{var t;return((t=e.data)===null||t===void 0?void 0:t.code)===Cp.LexingError}))){return i}this.processParsingErrors(r,i,t);if(t.stopAfterParsingErrors&&i.some((e=>{var t;return((t=e.data)===null||t===void 0?void 0:t.code)===Cp.ParsingError}))){return i}this.processLinkingErrors(e,i,t);if(t.stopAfterLinkingErrors&&i.some((e=>{var t;return((t=e.data)===null||t===void 0?void 0:t.code)===Cp.LinkingError}))){return i}}try{i.push(...await this.validateAst(r.value,t,n))}catch(s){if(Fh(s)){throw s}console.error("An error occurred during validation:",s)}await Gh(n);return i}processLexingErrors(e,t,n){for(const r of e.lexerErrors){const e={severity:Np("error"),range:{start:{line:r.line-1,character:r.column-1},end:{line:r.line-1,character:r.column+r.length-1}},message:r.message,data:kp(Cp.LexingError),source:this.getSource()};t.push(e)}}processParsingErrors(e,t,n){for(const r of e.parserErrors){let e=undefined;if(isNaN(r.token.startOffset)){if("previousToken"in r){const t=r.previousToken;if(!isNaN(t.startOffset)){const n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}else{const t={line:0,character:0};e={start:t,end:t}}}}else{e=R(r.token)}if(e){const n={severity:Np("error"),range:e,message:r.message,data:kp(Cp.ParsingError),source:this.getSource()};t.push(n)}}}processLinkingErrors(e,t,n){for(const r of e.references){const e=r.error;if(e){const n={node:e.container,property:e.property,index:e.index,data:{code:Cp.LinkingError,containerType:e.container.$type,property:e.property,refText:e.reference.$refText}};t.push(this.toDiagnostic("error",e.message,n))}}}async validateAst(e,t,n=bh.CancellationToken.None){const r=[];const i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};await Promise.all(Ut(e).map((async e=>{await Gh(n);const r=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of r){await t(e,i,n)}})));return r}toDiagnostic(e,t,n){return{message:t,range:wp(n),severity:Np(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function wp(e){if(e.range){return e.range}let t;if(typeof e.property==="string"){t=xn(e.node.$cstNode,e.property,e.index)}else if(typeof e.keyword==="string"){t=wn(e.node.$cstNode,e.keyword,e.index)}t!==null&&t!==void 0?t:t=e.node.$cstNode;if(!t){return{start:{line:0,character:0},end:{line:0,character:0}}}return t.range}function Np(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}var Cp;(function(e){e.LexingError="lexing-error";e.ParsingError="parsing-error";e.LinkingError="linking-error"})(Cp||(Cp={}));class $p{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator;this.nameProvider=e.references.NameProvider}createDescription(e,t,n=Ot(e)){t!==null&&t!==void 0?t:t=this.nameProvider.getName(e);const r=this.astNodeLocator.getAstNodePath(e);if(!t){throw new Error(`Node at path ${r} has no name.`)}let i;const s=()=>{var t;return i!==null&&i!==void 0?i:i=k((t=this.nameProvider.getNameNode(e))!==null&&t!==void 0?t:e.$cstNode)};return{node:e,name:t,get nameSegment(){return s()},selectionSegment:k(e.$cstNode),type:e.$type,documentUri:n.uri,path:r}}}class Lp{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=bh.CancellationToken.None){const n=[];const r=e.parseResult.value;for(const i of Ut(r)){await Gh(t);Gt(i).filter((e=>!a(e))).forEach((e=>{const t=this.createDescription(e);if(t){n.push(t)}}))}return n}createDescription(e){const t=e.reference.$nodeDescription;const n=e.reference.$refNode;if(!t||!n){return undefined}const r=Ot(e.container).uri;return{sourceUri:r,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:t.documentUri,targetPath:t.path,segment:k(n),local:Zh.equals(t.documentUri,r)}}}class bp{constructor(){this.segmentSeparator="/";this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container);const n=this.getPathSegment(e);const r=t+this.segmentSeparator+n;return r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e){throw new Error("Missing '$containerProperty' in AST node.")}if(t!==undefined){return e+this.indexSeparator+t}return e}getAstNode(e,t){const n=t.split(this.segmentSeparator);return n.reduce(((e,t)=>{if(!e||t.length===0){return e}const n=t.indexOf(this.indexSeparator);if(n>0){const r=t.substring(0,n);const i=parseInt(t.substring(n+1));const s=e[r];return s===null||s===void 0?void 0:s[i]}return e[t]}),e)}}class _p{constructor(e){this._ready=new Bh;this.settings={};this.workspaceConfig=false;this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t,n;this.workspaceConfig=(n=(t=e.capabilities.workspace)===null||t===void 0?void 0:t.configuration)!==null&&n!==void 0?n:false}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map((e=>this.toSectionName(e.LanguageMetaData.languageId)))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map((e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})));const n=await e.fetchConfiguration(t);t.forEach(((e,t)=>{this.updateSectionConfiguration(e.section,n[t])}))}}this._ready.resolve()}updateConfiguration(e){if(!e.settings){return}Object.keys(e.settings).forEach((t=>{this.updateSectionConfiguration(t,e.settings[t])}))}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const n=this.toSectionName(e);if(this.settings[n]){return this.settings[n][t]}}toSectionName(e){return`${e}`}}var Op;(function(e){function t(e){return{dispose:async()=>await e()}}e.create=t})(Op||(Op={}));class Pp{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}};this.updateListeners=[];this.buildPhaseListeners=new op;this.buildState=new Map;this.documentBuildWaiters=new Map;this.currentState=ep.Changed;this.langiumDocuments=e.workspace.LangiumDocuments;this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory;this.indexManager=e.workspace.IndexManager;this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=bh.CancellationToken.None){var r,i;for(const s of e){const e=s.uri.toString();if(s.state===ep.Validated){if(typeof t.validation==="boolean"&&t.validation){s.state=ep.IndexedReferences;s.diagnostics=undefined;this.buildState.delete(e)}else if(typeof t.validation==="object"){const n=this.buildState.get(e);const a=(r=n===null||n===void 0?void 0:n.result)===null||r===void 0?void 0:r.validationChecks;if(a){const r=(i=t.validation.categories)!==null&&i!==void 0?i:xp.all;const o=r.filter((e=>!a.includes(e)));if(o.length>0){this.buildState.set(e,{completed:false,options:{validation:Object.assign(Object.assign({},t.validation),{categories:o})},result:n.result});s.state=ep.IndexedReferences}}}}else{this.buildState.delete(e)}}this.currentState=ep.Changed;await this.emitUpdate(e.map((e=>e.uri)),[]);await this.buildDocuments(e,t,n)}async update(e,t,n=bh.CancellationToken.None){this.currentState=ep.Changed;for(const s of t){this.langiumDocuments.deleteDocument(s);this.buildState.delete(s.toString());this.indexManager.remove(s)}for(const s of e){const e=this.langiumDocuments.invalidateDocument(s);if(!e){const e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},s);e.state=ep.Changed;this.langiumDocuments.addDocument(e)}this.buildState.delete(s.toString())}const r=g(e).concat(t).map((e=>e.toString())).toSet();this.langiumDocuments.all.filter((e=>!r.has(e.uri.toString())&&this.shouldRelink(e,r))).forEach((e=>{const t=this.serviceRegistry.getServices(e.uri).references.Linker;t.unlink(e);e.state=Math.min(e.state,ep.ComputedScopes);e.diagnostics=undefined}));await this.emitUpdate(e,t);await Gh(n);const i=this.langiumDocuments.all.filter((e=>{var t;return e.state<ep.Linked||!((t=this.buildState.get(e.uri.toString()))===null||t===void 0?void 0:t.completed)})).toArray();await this.buildDocuments(i,this.updateBuildOptions,n)}async emitUpdate(e,t){await Promise.all(this.updateListeners.map((n=>n(e,t))))}shouldRelink(e,t){if(e.references.some((e=>e.error!==undefined))){return true}return this.indexManager.isAffected(e,t)}onUpdate(e){this.updateListeners.push(e);return Op.create((()=>{const t=this.updateListeners.indexOf(e);if(t>=0){this.updateListeners.splice(t,1)}}))}async buildDocuments(e,t,n){this.prepareBuild(e,t);await this.runCancelable(e,ep.Parsed,n,(e=>this.langiumDocumentFactory.update(e,n)));await this.runCancelable(e,ep.IndexedContent,n,(e=>this.indexManager.updateContent(e,n)));await this.runCancelable(e,ep.ComputedScopes,n,(async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.precomputedScopes=await t.computeLocalScopes(e,n)}));await this.runCancelable(e,ep.Linked,n,(e=>{const t=this.serviceRegistry.getServices(e.uri).references.Linker;return t.link(e,n)}));await this.runCancelable(e,ep.IndexedReferences,n,(e=>this.indexManager.updateReferences(e,n)));const r=e.filter((e=>this.shouldValidate(e)));await this.runCancelable(r,ep.Validated,n,(e=>this.validate(e,n)));for(const i of e){const e=this.buildState.get(i.uri.toString());if(e){e.completed=true}}}prepareBuild(e,t){for(const n of e){const e=n.uri.toString();const r=this.buildState.get(e);if(!r||r.completed){this.buildState.set(e,{completed:false,options:t,result:r===null||r===void 0?void 0:r.result})}}}async runCancelable(e,t,n,r){const i=e.filter((e=>e.state<t));for(const s of i){await Gh(n);await r(s);s.state=t}await this.notifyBuildPhase(i,t,n);this.currentState=t}onBuildPhase(e,t){this.buildPhaseListeners.add(e,t);return Op.create((()=>{this.buildPhaseListeners.delete(e,t)}))}waitUntil(e,t,n){let r=undefined;if(t&&"path"in t){r=t}else{n=t}n!==null&&n!==void 0?n:n=bh.CancellationToken.None;if(r){const t=this.langiumDocuments.getDocument(r);if(t&&t.state>e){return Promise.resolve(r)}}if(this.currentState>=e){return Promise.resolve(undefined)}else if(n.isCancellationRequested){return Promise.reject(Uh)}return new Promise(((t,i)=>{const s=this.onBuildPhase(e,(()=>{s.dispose();a.dispose();if(r){const e=this.langiumDocuments.getDocument(r);t(e===null||e===void 0?void 0:e.uri)}else{t(undefined)}}));const a=n.onCancellationRequested((()=>{s.dispose();a.dispose();i(Uh)}))}))}async notifyBuildPhase(e,t,n){if(e.length===0){return}const r=this.buildPhaseListeners.get(t);for(const i of r){await Gh(n);await i(e,n)}}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){var n,r;const i=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator;const s=this.getBuildOptions(e).validation;const a=typeof s==="object"?s:undefined;const o=await i.validateDocument(e,a,t);if(e.diagnostics){e.diagnostics.push(...o)}else{e.diagnostics=o}const c=this.buildState.get(e.uri.toString());if(c){(n=c.result)!==null&&n!==void 0?n:c.result={};const e=(r=a===null||a===void 0?void 0:a.categories)!==null&&r!==void 0?r:xp.all;if(c.result.validationChecks){c.result.validationChecks.push(...e)}else{c.result.validationChecks=[...e]}}}getBuildOptions(e){var t,n;return(n=(t=this.buildState.get(e.uri.toString()))===null||t===void 0?void 0:t.options)!==null&&n!==void 0?n:{}}}class Mp{constructor(e){this.symbolIndex=new Map;this.symbolByTypeIndex=new mp;this.referenceIndex=new Map;this.documents=e.workspace.LangiumDocuments;this.serviceRegistry=e.ServiceRegistry;this.astReflection=e.AstReflection}findAllReferences(e,t){const n=Ot(e).uri;const r=[];this.referenceIndex.forEach((e=>{e.forEach((e=>{if(Zh.equals(e.targetUri,n)&&e.targetPath===t){r.push(e)}}))}));return g(r)}allElements(e,t){let n=g(this.symbolIndex.keys());if(t){n=n.filter((e=>!t||t.has(e)))}return n.map((t=>this.getFileDescriptions(t,e))).flat()}getFileDescriptions(e,t){var n;if(!t){return(n=this.symbolIndex.get(e))!==null&&n!==void 0?n:[]}const r=this.symbolByTypeIndex.get(e,t,(()=>{var n;const r=(n=this.symbolIndex.get(e))!==null&&n!==void 0?n:[];return r.filter((e=>this.astReflection.isSubtype(e.type,t)))}));return r}remove(e){const t=e.toString();this.symbolIndex.delete(t);this.symbolByTypeIndex.clear(t);this.referenceIndex.delete(t)}async updateContent(e,t=bh.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri);const r=await n.references.ScopeComputation.computeExports(e,t);const i=e.uri.toString();this.symbolIndex.set(i,r);this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=bh.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri);const r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){const n=this.referenceIndex.get(e.uri.toString());if(!n){return false}return n.some((e=>!e.local&&t.has(e.targetUri.toString())))}}class Dp{constructor(e){this.initialBuildOptions={};this._ready=new Bh;this.serviceRegistry=e.ServiceRegistry;this.langiumDocuments=e.workspace.LangiumDocuments;this.documentBuilder=e.workspace.DocumentBuilder;this.fileSystemProvider=e.workspace.FileSystemProvider;this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var t;this.folders=(t=e.workspaceFolders)!==null&&t!==void 0?t:undefined}initialized(e){return this.mutex.write((e=>{var t;return this.initializeWorkspace((t=this.folders)!==null&&t!==void 0?t:[],e)}))}async initializeWorkspace(e,t=bh.CancellationToken.None){const n=await this.performStartup(e);await Gh(t);await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){const t=this.serviceRegistry.all.flatMap((e=>e.LanguageMetaData.fileExtensions));const n=[];const r=e=>{n.push(e);if(!this.langiumDocuments.hasDocument(e.uri)){this.langiumDocuments.addDocument(e)}};await this.loadAdditionalDocuments(e,r);await Promise.all(e.map((e=>[e,this.getRootFolder(e)])).map((async e=>this.traverseFolder(...e,t,r))));this._ready.resolve();return n}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Qh.parse(e.uri)}async traverseFolder(e,t,n,r){const i=await this.fileSystemProvider.readDirectory(t);await Promise.all(i.map((async t=>{if(this.includeEntry(e,t,n)){if(t.isDirectory){await this.traverseFolder(e,t.uri,n,r)}else if(t.isFile){const e=await this.langiumDocuments.getOrCreateDocument(t.uri);r(e)}}})))}includeEntry(e,t,n){const r=Zh.basename(t.uri);if(r.startsWith(".")){return false}if(t.isDirectory){return r!=="node_modules"&&r!=="out"}else if(t.isFile){const e=Zh.extname(t.uri);return n.includes(e)}return false}}class Up{constructor(e){const t=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const n=Bp(t)?Object.values(t):t;this.chevrotainLexer=new Ga(n,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var t;const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:(t=n.groups.hidden)!==null&&t!==void 0?t:[]}}toTokenTypeDictionary(e){if(Bp(e))return e;const t=Gp(e)?Object.values(e.modes).flat():e;const n={};t.forEach((e=>n[e.name]=e));return n}}function Fp(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}function Gp(e){return e&&"modes"in e&&"defaultMode"in e}function Bp(e){return!Fp(e)&&!Gp(e)}function Kp(e,t,n){let r;let i;if(typeof e==="string"){i=t;r=n}else{i=e.range.start;r=t}if(!i){i=Tf.create(0,0)}const s=Vp(e);const a=am(r);const o=zp({lines:s,position:i,options:a});return Zp({index:0,tokens:o,position:i})}function jp(e,t){const n=am(t);const r=Vp(e);if(r.length===0){return false}const i=r[0];const s=r[r.length-1];const a=n.start;const o=n.end;return Boolean(a===null||a===void 0?void 0:a.exec(i))&&Boolean(o===null||o===void 0?void 0:o.exec(s))}function Vp(e){let t="";if(typeof e==="string"){t=e}else{t=e.text}const n=t.split(an);return n}const Wp=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy;const Hp=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function zp(e){var t,n,r;const i=[];let s=e.position.line;let a=e.position.character;for(let o=0;o<e.lines.length;o++){const c=o===0;const u=o===e.lines.length-1;let l=e.lines[o];let f=0;if(c&&e.options.start){const n=(t=e.options.start)===null||t===void 0?void 0:t.exec(l);if(n){f=n.index+n[0].length}}else{const t=(n=e.options.line)===null||n===void 0?void 0:n.exec(l);if(t){f=t.index+t[0].length}}if(u){const t=(r=e.options.end)===null||r===void 0?void 0:r.exec(l);if(t){l=l.substring(0,t.index)}}l=l.substring(0,Jp(l));const d=Qp(l,f);if(d>=l.length){if(i.length>0){const e=Tf.create(s,a);i.push({type:"break",content:"",range:vf.create(e,e)})}}else{Wp.lastIndex=f;const e=Wp.exec(l);if(e){const t=e[0];const n=e[1];const r=Tf.create(s,a+f);const o=Tf.create(s,a+f+t.length);i.push({type:"tag",content:n,range:vf.create(r,o)});f+=t.length;f=Qp(l,f)}if(f<l.length){const e=l.substring(f);const t=Array.from(e.matchAll(Hp));i.push(...qp(t,e,s,a+f))}}s++;a=0}if(i.length>0&&i[i.length-1].type==="break"){return i.slice(0,-1)}return i}function qp(e,t,n,r){const i=[];if(e.length===0){const e=Tf.create(n,r);const s=Tf.create(n,r+t.length);i.push({type:"text",content:t,range:vf.create(e,s)})}else{let s=0;for(const o of e){const e=o.index;const a=t.substring(s,e);if(a.length>0){i.push({type:"text",content:t.substring(s,e),range:vf.create(Tf.create(n,s+r),Tf.create(n,e+r))})}let c=a.length+1;const u=o[1];i.push({type:"inline-tag",content:u,range:vf.create(Tf.create(n,s+c+r),Tf.create(n,s+c+u.length+r))});c+=u.length;if(o.length===4){c+=o[2].length;const e=o[3];i.push({type:"text",content:e,range:vf.create(Tf.create(n,s+c+r),Tf.create(n,s+c+e.length+r))})}else{i.push({type:"text",content:"",range:vf.create(Tf.create(n,s+c+r),Tf.create(n,s+c+r))})}s=e+o[0].length}const a=t.substring(s);if(a.length>0){i.push({type:"text",content:a,range:vf.create(Tf.create(n,s+r),Tf.create(n,s+r+a.length))})}}return i}const Yp=/\S/;const Xp=/\s*$/;function Qp(e,t){const n=e.substring(t).match(Yp);if(n){return t+n.index}else{return e.length}}function Jp(e){const t=e.match(Xp);if(t&&typeof t.index==="number"){return t.index}return undefined}function Zp(e){var t,n,r,i;const s=Tf.create(e.position.line,e.position.character);if(e.tokens.length===0){return new cm([],vf.create(s,s))}const a=[];while(e.index<e.tokens.length){const t=em(e,a[a.length-1]);if(t){a.push(t)}}const o=(n=(t=a[0])===null||t===void 0?void 0:t.range.start)!==null&&n!==void 0?n:s;const c=(i=(r=a[a.length-1])===null||r===void 0?void 0:r.range.end)!==null&&i!==void 0?i:s;return new cm(a,vf.create(o,c))}function em(e,t){const n=e.tokens[e.index];if(n.type==="tag"){return im(e,false)}else if(n.type==="text"||n.type==="inline-tag"){return nm(e)}else{tm(n,t);e.index++;return undefined}}function tm(e,t){if(t){const n=new hm("",e.range);if("inlines"in t){t.inlines.push(n)}else{t.content.inlines.push(n)}}}function nm(e){let t=e.tokens[e.index];const n=t;let r=t;const i=[];while(t&&t.type!=="break"&&t.type!=="tag"){i.push(rm(e));r=t;t=e.tokens[e.index]}return new dm(i,vf.create(n.range.start,r.range.end))}function rm(e){const t=e.tokens[e.index];if(t.type==="inline-tag"){return im(e,true)}else{return sm(e)}}function im(e,t){const n=e.tokens[e.index++];const r=n.content.substring(1);const i=e.tokens[e.index];if((i===null||i===void 0?void 0:i.type)==="text"){if(t){const i=sm(e);return new um(r,new dm([i],i.range),t,vf.create(n.range.start,i.range.end))}else{const i=nm(e);return new um(r,i,t,vf.create(n.range.start,i.range.end))}}else{const e=n.range;return new um(r,new dm([],e),t,e)}}function sm(e){const t=e.tokens[e.index++];return new hm(t.content,t.range)}function am(e){if(!e){return am({start:"/**",end:"*/",line:"*"})}const{start:t,end:n,line:r}=e;return{start:om(t,true),end:om(n,false),line:om(r,true)}}function om(e,t){if(typeof e==="string"||typeof e==="object"){const n=typeof e==="string"?hn(e):e.source;if(t){return new RegExp(`^\\s*${n}`)}else{return new RegExp(`\\s*${n}\\s*$`)}}else{return e}}class cm{constructor(e,t){this.elements=e;this.range=t}getTag(e){return this.getAllTags().find((t=>t.name===e))}getTags(e){return this.getAllTags().filter((t=>t.name===e))}getAllTags(){return this.elements.filter((e=>"name"in e))}toString(){let e="";for(const t of this.elements){if(e.length===0){e=t.toString()}else{const n=t.toString();e+=pm(e)+n}}return e.trim()}toMarkdown(e){let t="";for(const n of this.elements){if(t.length===0){t=n.toMarkdown(e)}else{const r=n.toMarkdown(e);t+=pm(t)+r}}return t.trim()}}class um{constructor(e,t,n,r){this.name=e;this.content=t;this.inline=n;this.range=r}toString(){let e=`@${this.name}`;const t=this.content.toString();if(this.content.inlines.length===1){e=`${e} ${t}`}else if(this.content.inlines.length>1){e=`${e}\n${t}`}if(this.inline){return`{${e}}`}else{return e}}toMarkdown(e){var t,n;return(n=(t=e===null||e===void 0?void 0:e.renderTag)===null||t===void 0?void 0:t.call(e,this))!==null&&n!==void 0?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const n=lm(this.name,t,e!==null&&e!==void 0?e:{});if(typeof n==="string"){return n}}let n="";if((e===null||e===void 0?void 0:e.tag)==="italic"||(e===null||e===void 0?void 0:e.tag)===undefined){n="*"}else if((e===null||e===void 0?void 0:e.tag)==="bold"){n="**"}else if((e===null||e===void 0?void 0:e.tag)==="bold-italic"){n="***"}let r=`${n}@${this.name}${n}`;if(this.content.inlines.length===1){r=`${r} — ${t}`}else if(this.content.inlines.length>1){r=`${r}\n${t}`}if(this.inline){return`{${r}}`}else{return r}}}function lm(e,t,n){var r,i;if(e==="linkplain"||e==="linkcode"||e==="link"){const s=t.indexOf(" ");let a=t;if(s>0){const e=Qp(t,s);a=t.substring(e);t=t.substring(0,s)}if(e==="linkcode"||e==="link"&&n.link==="code"){a=`\`${a}\``}const o=(i=(r=n.renderLink)===null||r===void 0?void 0:r.call(n,t,a))!==null&&i!==void 0?i:fm(t,a);return o}return undefined}function fm(e,t){try{Qh.parse(e,true);return`[${t}](${e})`}catch(n){return e}}class dm{constructor(e,t){this.inlines=e;this.range=t}toString(){let e="";for(let t=0;t<this.inlines.length;t++){const n=this.inlines[t];const r=this.inlines[t+1];e+=n.toString();if(r&&r.range.start.line>n.range.start.line){e+="\n"}}return e}toMarkdown(e){let t="";for(let n=0;n<this.inlines.length;n++){const r=this.inlines[n];const i=this.inlines[n+1];t+=r.toMarkdown(e);if(i&&i.range.start.line>r.range.start.line){t+="\n"}}return t}}class hm{constructor(e,t){this.text=e;this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function pm(e){if(e.endsWith("\n")){return"\n"}else{return"\n\n"}}class mm{constructor(e){this.indexManager=e.shared.workspace.IndexManager;this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&jp(t)){const n=Kp(t);return n.toMarkdown({renderLink:(t,n)=>this.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}return undefined}documentationLinkRenderer(e,t,n){var r;const i=(r=this.findNameInPrecomputedScopes(e,t))!==null&&r!==void 0?r:this.findNameInGlobalScope(e,t);if(i&&i.nameSegment){const e=i.nameSegment.range.start.line+1;const t=i.nameSegment.range.start.character+1;const r=i.documentUri.with({fragment:`L${e},${t}`});return`[${n}](${r.toString()})`}else{return undefined}}documentationTagRenderer(e,t){return undefined}findNameInPrecomputedScopes(e,t){const n=Ot(e);const r=n.precomputedScopes;if(!r){return undefined}let i=e;do{const e=r.get(i);const n=e.find((e=>e.name===t));if(n){return n}i=i.$container}while(i);return undefined}findNameInGlobalScope(e,t){const n=this.indexManager.allElements().find((e=>e.name===t));return n}}class gm{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;if(Tp(e)){return e.$comment}return(t=C(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||t===void 0?void 0:t.text}}var ym=n(62676);class Am{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}}class Tm{constructor(e){this.threadCount=8;this.terminationDelay=200;this.workerPool=[];this.queue=[];this.hydrator=e.serializer.Hydrator}initializeWorkers(){while(this.workerPool.length<this.threadCount){const e=this.createWorker();e.onReady((()=>{if(this.queue.length>0){const t=this.queue.shift();if(t){e.lock();t.resolve(e)}}}));this.workerPool.push(e)}}async parse(e,t){const n=await this.acquireParserWorker(t);const r=new Deferred;let i;const s=t.onCancellationRequested((()=>{i=setTimeout((()=>{this.terminateWorker(n)}),this.terminationDelay)}));n.parse(e).then((e=>{const t=this.hydrator.hydrate(e);r.resolve(t)})).catch((e=>{r.reject(e)})).finally((()=>{s.dispose();clearTimeout(i)}));return r.promise}terminateWorker(e){e.terminate();const t=this.workerPool.indexOf(e);if(t>=0){this.workerPool.splice(t,1)}}async acquireParserWorker(e){this.initializeWorkers();for(const n of this.workerPool){if(n.ready){n.lock();return n}}const t=new Deferred;e.onCancellationRequested((()=>{const e=this.queue.indexOf(t);if(e>=0){this.queue.splice(e,1)}t.reject(OperationCancelled)}));this.queue.push(t);return t.promise}}class vm{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,n,r){this.onReadyEmitter=new Emitter;this.deferred=new Deferred;this._ready=true;this._parsing=false;this.sendMessage=e;this._terminate=r;t((e=>{const t=e;this.deferred.resolve(t);this.unlock()}));n((e=>{this.deferred.reject(e);this.unlock()}))}terminate(){this.deferred.reject(OperationCancelled);this._terminate()}lock(){this._ready=false}unlock(){this._parsing=false;this._ready=true;this.onReadyEmitter.fire()}parse(e){if(this._parsing){throw new Error("Parser worker is busy")}this._parsing=true;this.deferred=new Deferred;this.sendMessage(e);return this.deferred.promise}}class Em{constructor(){this.previousTokenSource=new bh.CancellationTokenSource;this.writeQueue=[];this.readQueue=[];this.done=true}write(e){this.cancelWrite();const t=new bh.CancellationTokenSource;this.previousTokenSource=t;return this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n){const r=new Bh;const i={action:t,deferred:r,cancellationToken:n!==null&&n!==void 0?n:bh.CancellationToken.None};e.push(i);this.performNextOperation();return r.promise}async performNextOperation(){if(!this.done){return}const e=[];if(this.writeQueue.length>0){e.push(this.writeQueue.shift())}else if(this.readQueue.length>0){e.push(...this.readQueue.splice(0,this.readQueue.length))}else{return}this.done=false;await Promise.all(e.map((async({action:e,deferred:t,cancellationToken:n})=>{try{const r=await Promise.resolve().then((()=>e(n)));t.resolve(r)}catch(r){if(Fh(r)){t.resolve(undefined)}else{t.reject(r)}}})));this.done=true;this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Rm{constructor(e){this.grammarElementIdMap=new cp;this.tokenTypeIdMap=new cp;this.grammar=e.Grammar;this.lexer=e.parser.Lexer;this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map((e=>Object.assign({},e))),parserErrors:e.parserErrors.map((e=>Object.assign({},e))),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){const t=new Map;const n=new Map;for(const r of Ut(e)){t.set(r,{})}if(e.$cstNode){for(const t of T(e.$cstNode)){n.set(t,{})}}return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type;n.$containerIndex=e.$containerIndex;n.$containerProperty=e.$containerProperty;if(e.$cstNode!==undefined){n.$cstNode=this.dehydrateCstNode(e.$cstNode,t)}for(const[s,a]of Object.entries(e)){if(s.startsWith("$")){continue}if(Array.isArray(a)){const e=[];n[s]=e;for(const n of a){if(r(n)){e.push(this.dehydrateAstNode(n,t))}else if(i(n)){e.push(this.dehydrateReference(n,t))}else{e.push(n)}}}else if(r(a)){n[s]=this.dehydrateAstNode(a,t)}else if(i(a)){n[s]=this.dehydrateReference(a,t)}else if(a!==undefined){n[s]=a}}return n}dehydrateReference(e,t){const n={};n.$refText=e.$refText;if(e.$refNode){n.$refNode=t.cstNodes.get(e.$refNode)}return n}dehydrateCstNode(e,t){const n=t.cstNodes.get(e);if(l(e)){n.fullText=e.fullText}else{n.grammarSource=this.getGrammarElementId(e.grammarSource)}n.hidden=e.hidden;n.astNode=t.astNodes.get(e.astNode);if(c(e)){n.content=e.content.map((e=>this.dehydrateCstNode(e,t)))}else if(u(e)){n.tokenType=e.tokenType.name;n.offset=e.offset;n.length=e.length;n.startLine=e.range.start.line;n.startColumn=e.range.start.character;n.endLine=e.range.end.line;n.endColumn=e.range.end.character}return n}hydrate(e){const t=e.value;const n=this.createHydrationContext(t);if("$cstNode"in t){this.hydrateCstNode(t.$cstNode,n)}return{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){const t=new Map;const n=new Map;for(const i of Ut(e)){t.set(i,{})}let r;if(e.$cstNode){for(const t of T(e.$cstNode)){let e;if("fullText"in t){e=new Qd(t.fullText);r=e}else if("content"in t){e=new Yd}else if("tokenType"in t){e=this.hydrateCstLeafNode(t)}if(e){n.set(t,e);e.root=r}}}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type;n.$containerIndex=e.$containerIndex;n.$containerProperty=e.$containerProperty;if(e.$cstNode){n.$cstNode=t.cstNodes.get(e.$cstNode)}for(const[s,a]of Object.entries(e)){if(s.startsWith("$")){continue}if(Array.isArray(a)){const e=[];n[s]=e;for(const o of a){if(r(o)){e.push(this.setParent(this.hydrateAstNode(o,t),n))}else if(i(o)){e.push(this.hydrateReference(o,n,s,t))}else{e.push(o)}}}else if(r(a)){n[s]=this.setParent(this.hydrateAstNode(a,t),n)}else if(i(a)){n[s]=this.hydrateReference(a,n,s,t)}else if(a!==undefined){n[s]=a}}return n}setParent(e,t){e.$container=t;return e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){const r=t.cstNodes.get(e);if(typeof e.grammarSource==="number"){r.grammarSource=this.getGrammarElement(e.grammarSource)}r.astNode=t.astNodes.get(e.astNode);if(c(r)){for(const i of e.content){const e=this.hydrateCstNode(i,t,n++);r.content.push(e)}}return r}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType);const n=e.offset;const r=e.length;const i=e.startLine;const s=e.startColumn;const a=e.endLine;const o=e.endColumn;const c=e.hidden;const u=new qd(n,r,{start:{line:i,character:s},end:{line:a,character:o}},t,c);return u}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(this.grammarElementIdMap.size===0){this.createGrammarElementIdMap()}return this.grammarElementIdMap.get(e)}getGrammarElement(e){if(this.grammarElementIdMap.size===0){this.createGrammarElementIdMap()}const t=this.grammarElementIdMap.getKey(e);if(t){return t}else{throw new Error("Invalid grammar element id: "+e)}}createGrammarElementIdMap(){let e=0;for(const t of Ut(this.grammar)){if(ne(t)){this.grammarElementIdMap.set(t,e++)}}}}function km(e){return{documentation:{CommentProvider:e=>new gm(e),DocumentationProvider:e=>new mm(e)},parser:{AsyncParser:e=>new Am(e),GrammarConfig:e=>er(e),LangiumParser:e=>wh(e),CompletionParser:e=>Sh(e),ValueConverter:()=>new $h,TokenBuilder:()=>new Ch,Lexer:e=>new Up(e),ParserErrorMessageProvider:()=>new sh},workspace:{AstNodeLocator:()=>new bp,AstNodeDescriptionProvider:e=>new $p(e),ReferenceDescriptionProvider:e=>new Lp(e)},references:{Linker:e=>new rp(e),NameProvider:()=>new sp,ScopeProvider:e=>new Ap(e),ScopeComputation:e=>new up(e),References:e=>new ap(e)},serializer:{Hydrator:e=>new Rm(e),JsonSerializer:e=>new Ep(e)},validation:{DocumentValidator:e=>new Sp(e),ValidationRegistry:e=>new Ip(e)},shared:()=>e.shared}}function xm(e){return{ServiceRegistry:()=>new Rp,workspace:{LangiumDocuments:e=>new np(e),LangiumDocumentFactory:e=>new tp(e),DocumentBuilder:e=>new Pp(e),IndexManager:e=>new Mp(e),WorkspaceManager:e=>new Dp(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new Em,ConfigurationProvider:e=>new _p(e)}}}var Im;(function(e){e.merge=(e,t)=>bm(bm({},e),t)})(Im||(Im={}));function Sm(e,t,n,r,i,s,a,o,c){const u=[e,t,n,r,i,s,a,o,c].reduce(bm,{});return Cm(u)}const wm=Symbol("isProxy");function Nm(e){if(e&&e[wm]){for(const t of Object.values(e)){Nm(t)}}return e}function Cm(e,t){const n=new Proxy({},{deleteProperty:()=>false,get:(r,i)=>Lm(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(Lm(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Reflect.ownKeys(e),wm]});n[wm]=true;return n}const $m=Symbol();function Lm(e,t,n,r){if(t in e){if(e[t]instanceof Error){throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:e[t]})}if(e[t]===$m){throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies')}return e[t]}else if(t in n){const s=n[t];e[t]=$m;try{e[t]=typeof s==="function"?s(r):Cm(s,r)}catch(i){e[t]=i instanceof Error?i:undefined;throw i}return e[t]}else{return undefined}}function bm(e,t){if(t){for(const[n,r]of Object.entries(t)){if(r!==undefined){const t=e[n];if(t!==null&&r!==null&&typeof t==="object"&&typeof r==="object"){e[n]=bm(t,r)}else{e[n]=r}}}}return e}class _m{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}}const Om={fileSystemProvider:()=>new _m};const Pm={Grammar:()=>undefined,LanguageMetaData:()=>({caseInsensitive:false,fileExtensions:[".langium"],languageId:"langium"})};const Mm={AstReflection:()=>new Ct};function Dm(){const e=Sm(xm(Om),Mm);const t=Sm(km({shared:e}),Pm);e.ServiceRegistry.register(t);return t}function Um(e){var t;const n=Dm();const r=n.serializer.JsonSerializer.deserialize(e);n.shared.workspace.LangiumDocumentFactory.fromModel(r,Qh.parse(`memory://${(t=r.name)!==null&&t!==void 0?t:"grammar"}.langium`));return r}},95852:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(62579);function i(e,t,n){var i=-1,s=e.length;while(++i<s){var a=e[i],o=t(a);if(o!=null&&(c===undefined?o===o&&!(0,r.A)(o):n(o,c))){var c=o,u=a}}return u}const s=i},51135:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});function r(e,t){return e<t}const i=r},97457:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(15912);var i=n(21585);function s(e,t){var n=-1,s=(0,i.A)(e)?Array(e.length):[];(0,r.A)(e,(function(e,r,i){s[++n]=t(e,r,i)}));return s}const a=s},44835:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(22883);var i=n(16542);var s=n(65900);var a=n(78912);var o=n(85356);var c=n(43512);function u(e,t,n,r){if(!(0,o.A)(e)){return e}t=(0,s.A)(t,e);var u=-1,l=t.length,f=l-1,d=e;while(d!=null&&++u<l){var h=(0,c.A)(t[u]),p=n;if(h==="__proto__"||h==="constructor"||h==="prototype"){return e}if(u!=f){var m=d[h];p=r?r(m,h,d):undefined;if(p===undefined){p=(0,o.A)(m)?m:(0,a.A)(t[u+1])?[]:{}}}(0,i.A)(d,h,p);d=d[h]}return e}const l=u;function f(e,t,n){var i=-1,a=t.length,o={};while(++i<a){var c=t[i],u=(0,r.A)(e,c);if(n(u,c)){l(o,(0,s.A)(c,e),u)}}return o}const d=f},97134:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(59386);var i=4;function s(e){return(0,r.A)(e,i)}const a=s},38693:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(55881);var i=n(24461);var s=n(31943);var a=n(13839);var o=Object.prototype;var c=o.hasOwnProperty;var u=(0,r.A)((function(e,t){e=Object(e);var n=-1;var r=t.length;var u=r>2?t[2]:undefined;if(u&&(0,s.A)(t[0],t[1],u)){r=1}while(++n<r){var l=t[n];var f=(0,a.A)(l);var d=-1;var h=f.length;while(++d<h){var p=f[d];var m=e[p];if(m===undefined||(0,i.A)(m,o[p])&&!c.call(e,p)){e[p]=l[p]}}}return e}));const l=u},85075:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(1121);var i=n(21585);var s=n(37947);function a(e){return function(t,n,a){var o=Object(t);if(!(0,i.A)(t)){var c=(0,r.A)(n,3);t=(0,s.A)(t);n=function(e){return c(o[e],e,o)}}var u=e(t,n,a);return u>-1?o[c?t[u]:u]:undefined}}const o=a;var c=n(97314);var u=n(29914);var l=Math.max;function f(e,t,n){var i=e==null?0:e.length;if(!i){return-1}var s=n==null?0:(0,u.A)(n);if(s<0){s=l(i+s,0)}return(0,c.A)(e,(0,r.A)(t,3),s)}const d=f;var h=o(d);const p=h},74033:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(62040);function i(e){var t=e==null?0:e.length;return t?(0,r.A)(e,1):[]}const s=i},2850:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=Object.prototype;var i=r.hasOwnProperty;function s(e,t){return e!=null&&i.call(e,t)}const a=s;var o=n(64491);function c(e,t){return e!=null&&(0,o.A)(e,t,a)}const u=c},86378:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(64128);var i=n(39990);var s=n(53315);var a="[object String]";function o(e){return typeof e=="string"||!(0,i.A)(e)&&(0,s.A)(e)&&(0,r.A)(e)==a}const c=o},80359:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});function r(e){var t=e==null?0:e.length;return t?e[t-1]:undefined}const i=r},8937:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(98519);var i=n(1121);var s=n(97457);var a=n(39990);function o(e,t){var n=(0,a.A)(e)?r.A:s.A;return n(e,(0,i.A)(t,3))}const c=o},963:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(95852);var i=n(51135);var s=n(63077);function a(e){return e&&e.length?(0,r.A)(e,s.A,i.A):undefined}const o=a},52712:(e,t,n)=>{"use strict";n.d(t,{A:()=>E});var r=/\s/;function i(e){var t=e.length;while(t--&&r.test(e.charAt(t))){}return t}const s=i;var a=/^\s+/;function o(e){return e?e.slice(0,s(e)+1).replace(a,""):e}const c=o;var u=n(85356);var l=n(62579);var f=0/0;var d=/^[-+]0x[0-9a-f]+$/i;var h=/^0b[01]+$/i;var p=/^0o[0-7]+$/i;var m=parseInt;function g(e){if(typeof e=="number"){return e}if((0,l.A)(e)){return f}if((0,u.A)(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=(0,u.A)(t)?t+"":t}if(typeof e!="string"){return e===0?e:+e}e=c(e);var n=h.test(e);return n||p.test(e)?m(e.slice(2),n?2:8):d.test(e)?f:+e}const y=g;var A=1/0,T=17976931348623157e292;function v(e){if(!e){return e===0?e:0}e=y(e);if(e===A||e===-A){var t=e<0?-1:1;return t*T}return e===e?e:0}const E=v},29914:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(52712);function i(e){var t=(0,r.A)(e),n=t%1;return t===t?n?t-n:t:0}const s=i},65606:e=>{var t=e.exports={};var n;var r;function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){n=setTimeout}else{n=i}}catch(e){n=i}try{if(typeof clearTimeout==="function"){r=clearTimeout}else{r=s}}catch(e){r=s}})();function a(e){if(n===setTimeout){return setTimeout(e,0)}if((n===i||!n)&&setTimeout){n=setTimeout;return setTimeout(e,0)}try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}function o(e){if(r===clearTimeout){return clearTimeout(e)}if((r===s||!r)&&clearTimeout){r=clearTimeout;return clearTimeout(e)}try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}var c=[];var u=false;var l;var f=-1;function d(){if(!u||!l){return}u=false;if(l.length){c=l.concat(c)}else{f=-1}if(c.length){h()}}function h(){if(u){return}var e=a(d);u=true;var t=c.length;while(t){l=c;c=[];while(++f<t){if(l){l[f].run()}}f=-1;t=c.length}l=null;u=false;o(e)}t.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1){for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}}c.push(new p(e,t));if(c.length===1&&!u){a(h)}};function p(e,t){this.fun=e;this.array=t}p.prototype.run=function(){this.fun.apply(null,this.array)};t.title="browser";t.browser=true;t.env={};t.argv=[];t.version="";t.versions={};function m(){}t.on=m;t.addListener=m;t.once=m;t.off=m;t.removeListener=m;t.removeAllListeners=m;t.emit=m;t.prependListener=m;t.prependOnceListener=m;t.listeners=function(e){return[]};t.binding=function(e){throw new Error("process.binding is not supported")};t.cwd=function(){return"/"};t.chdir=function(e){throw new Error("process.chdir is not supported")};t.umask=function(){return 0}},59850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(69590);const i=n(78585);const s=n(62676);var a;(function(e){e.None=Object.freeze({isCancellationRequested:false,onCancellationRequested:s.Event.None});e.Cancelled=Object.freeze({isCancellationRequested:true,onCancellationRequested:s.Event.None});function t(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}e.is=t})(a||(t.CancellationToken=a={}));const o=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{constructor(){this._isCancelled=false}cancel(){if(!this._isCancelled){this._isCancelled=true;if(this._emitter){this._emitter.fire(undefined);this.dispose()}}}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){if(this._isCancelled){return o}if(!this._emitter){this._emitter=new s.Emitter}return this._emitter.event}dispose(){if(this._emitter){this._emitter.dispose();this._emitter=undefined}}}class u{get token(){if(!this._token){this._token=new c}return this._token}cancel(){if(!this._token){this._token=a.Cancelled}else{this._token.cancel()}}dispose(){if(!this._token){this._token=a.None}else if(this._token instanceof c){this._token.dispose()}}}t.CancellationTokenSource=u},62676:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Emitter=t.Event=void 0;const r=n(69590);var i;(function(e){const t={dispose(){}};e.None=function(){return t}})(i||(t.Event=i={}));class s{add(e,t=null,n){if(!this._callbacks){this._callbacks=[];this._contexts=[]}this._callbacks.push(e);this._contexts.push(t);if(Array.isArray(n)){n.push({dispose:()=>this.remove(e,t)})}}remove(e,t=null){if(!this._callbacks){return}let n=false;for(let r=0,i=this._callbacks.length;r<i;r++){if(this._callbacks[r]===e){if(this._contexts[r]===t){this._callbacks.splice(r,1);this._contexts.splice(r,1);return}else{n=true}}}if(n){throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...e){if(!this._callbacks){return[]}const t=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let a=0,o=n.length;a<o;a++){try{t.push(n[a].apply(i[a],e))}catch(s){(0,r.default)().console.error(s)}}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=undefined;this._contexts=undefined}}class a{constructor(e){this._options=e}get event(){if(!this._event){this._event=(e,t,n)=>{if(!this._callbacks){this._callbacks=new s}if(this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()){this._options.onFirstListenerAdd(this)}this._callbacks.add(e,t);const r={dispose:()=>{if(!this._callbacks){return}this._callbacks.remove(e,t);r.dispose=a._noop;if(this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()){this._options.onLastListenerRemove(this)}}};if(Array.isArray(n)){n.push(r)}return r}}return this._event}fire(e){if(this._callbacks){this._callbacks.invoke.call(this._callbacks,e)}}dispose(){if(this._callbacks){this._callbacks.dispose();this._callbacks=undefined}}}t.Emitter=a;a._noop=function(){}},78585:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function n(e){return e===true||e===false}t.boolean=n;function r(e){return typeof e==="string"||e instanceof String}t.string=r;function i(e){return typeof e==="number"||e instanceof Number}t.number=i;function s(e){return e instanceof Error}t.error=s;function a(e){return typeof e==="function"}t.func=a;function o(e){return Array.isArray(e)}t.array=o;function c(e){return o(e)&&e.every((e=>r(e)))}t.stringArray=c},69590:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});let n;function r(){if(n===undefined){throw new Error(`No runtime abstraction layer installed`)}return n}(function(e){function t(e){if(e===undefined){throw new Error(`No runtime abstraction layer provided`)}n=e}e.install=t})(r||(r={}));t["default"]=r}}]);
|