@carbon/ai-chat-components 0.6.2 → 0.7.0-rc.0
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.
- package/custom-elements.json +2611 -3856
- package/dist/16-BZMv8BLP.js +91 -0
- package/dist/16-DTIyOew7.js +91 -0
- package/dist/button-VYkJ5dwm.js +157 -0
- package/dist/button-skeleton-C44ojFOx.js +131 -0
- package/dist/card.min.js +193 -0
- package/dist/chain-of-thought.min.js +173 -155
- package/dist/chat-button.min.js +23 -23
- package/dist/checkbox-skeleton-B1dsTlWl.js +166 -0
- package/dist/{lit-element-DibNdm1l.js → class-map-CAQcKAyP.js} +38 -22
- package/dist/code-snippet.min.js +21 -21
- package/dist/codemirror-runtime-DjJTvK74.js +173 -0
- package/dist/{dockerfile-CKwmNxGw.js → dockerfile-C5Ju62-g.js} +21 -21
- package/dist/{factor-PwV725w2.js → factor-BLzOdeEw.js} +21 -21
- package/dist/feedback.min.js +68 -87
- package/dist/{icon-button-Ddd1Ihho.js → icon-button-B9XqYdUx.js} +33 -33
- package/dist/{icon-loader-DuM8rfP3.js → icon-loader-tzlfALFt.js} +23 -23
- package/dist/{if-defined-CbQ0hWcL.js → if-defined-DvPtK2Df.js} +22 -22
- package/dist/index--QAAkyqA.js +91 -0
- package/dist/{index-B1YAtZGR.js → index-1zAoDu0L.js} +21 -21
- package/dist/{index-BtI1vT4z.js → index-B6ll86Y6.js} +21 -21
- package/dist/index-B9DVtGsv.js +278 -0
- package/dist/index-BPU5uHmK.js +91 -0
- package/dist/index-BbWtDXd9.js +91 -0
- package/dist/index-BjsxSbgO.js +91 -0
- package/dist/index-BwI8x9E4.js +91 -0
- package/dist/index-C3KNlXVv.js +168 -0
- package/dist/index-CAdio42O.js +91 -0
- package/dist/index-CSMhs9Fm.js +91 -0
- package/dist/index-CU0IEHyz.js +91 -0
- package/dist/index-Cj-ZmC-W.js +91 -0
- package/dist/index-Ctl66nQF.js +91 -0
- package/dist/index-D7MLs7w5.js +91 -0
- package/dist/index-DH8wnvUn.js +91 -0
- package/dist/index-DWn_nnHo.js +91 -0
- package/dist/index-DpqlVRJ7.js +91 -0
- package/dist/index-Dx9Ms_uJ.js +91 -0
- package/dist/index-EwTPqhmw.js +91 -0
- package/dist/index-P1vutKel.js +91 -0
- package/dist/index-WQxGinYJ.js +91 -0
- package/dist/index-cK4rXRw-.js +91 -0
- package/dist/index-o-THaGga.js +91 -0
- package/dist/loading-icon-CRrLjNZH.js +106 -0
- package/dist/markdown.min.js +72 -70
- package/dist/{nsis-CWLatKhG.js → nsis-Biw-VyZu.js} +21 -21
- package/dist/processing.min.js +23 -23
- package/dist/{pug-DiwBvjDI.js → pug-BuYdIlne.js} +21 -21
- package/dist/reasoning-steps.min.js +69 -38
- package/dist/{state-B20s9hJU.js → state-CBq0UPBm.js} +21 -21
- package/dist/{table-runtime-CzipYmcB.js → table-runtime-CzXXhWmg.js} +86 -86
- package/dist/table.min.js +21 -21
- package/dist/text-input-VC8mmTlR.js +158 -0
- package/dist/toolbar.min.js +54 -56
- package/dist/workspace-shell.min.js +46 -51
- package/es/components/card/index.d.ts +11 -0
- package/es/components/{tile-container → card}/index.js +3 -1
- package/es/components/{tile-container → card}/index.js.map +1 -1
- package/es/components/card/src/card-footer.d.ts +43 -0
- package/es/components/card/src/card-footer.js +140 -0
- package/es/components/card/src/card-footer.js.map +1 -0
- package/es/components/card/src/card-footer.scss.js +13 -0
- package/es/components/card/src/card-footer.scss.js.map +1 -0
- package/es/components/card/src/card-steps.d.ts +28 -0
- package/es/components/card/src/card-steps.js +90 -0
- package/es/components/card/src/card-steps.js.map +1 -0
- package/es/components/{tile-container/src/tile-container.scss.js → card/src/card-steps.scss.js} +2 -2
- package/es/components/card/src/card-steps.scss.js.map +1 -0
- package/es/components/card/src/card.d.ts +27 -0
- package/es/components/card/src/card.js +65 -0
- package/es/components/card/src/card.js.map +1 -0
- package/es/components/card/src/card.scss.js +13 -0
- package/es/components/card/src/card.scss.js.map +1 -0
- package/es/components/chain-of-thought/defs.d.ts +54 -0
- package/es/components/chain-of-thought/{src/types.js → defs.js} +10 -1
- package/es/components/chain-of-thought/defs.js.map +1 -0
- package/es/components/chain-of-thought/index.d.ts +10 -4
- package/es/components/chain-of-thought/index.js +5 -3
- package/es/components/chain-of-thought/index.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-step.d.ts +43 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.js +351 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.scss.js +13 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.scss.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +33 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js +107 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.scss.js +13 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.scss.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought.d.ts +23 -69
- package/es/components/chain-of-thought/src/chain-of-thought.js +88 -145
- package/es/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought.scss.js +1 -1
- package/es/components/chain-of-thought/src/tool-call-data.d.ts +33 -0
- package/es/components/chain-of-thought/src/tool-call-data.js +179 -0
- package/es/components/chain-of-thought/src/tool-call-data.js.map +1 -0
- package/es/components/chain-of-thought/src/tool-call-data.scss.js +13 -0
- package/es/components/chain-of-thought/src/tool-call-data.scss.js.map +1 -0
- package/es/components/chat-button/src/chat-button.d.ts +11 -3
- package/es/components/chat-button/src/chat-button.js +15 -11
- package/es/components/chat-button/src/chat-button.js.map +1 -1
- package/es/components/code-snippet/index.d.ts +2 -2
- package/es/components/code-snippet/index.js +1 -1
- package/es/components/code-snippet/src/code-snippet-card.d.ts +63 -0
- package/es/components/code-snippet/src/code-snippet-card.js +186 -0
- package/es/components/code-snippet/src/code-snippet-card.js.map +1 -0
- package/es/components/code-snippet/src/code-snippet.d.ts +32 -31
- package/es/components/code-snippet/src/code-snippet.js +115 -29
- package/es/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
- package/es/components/feedback/index.d.ts +4 -7
- package/es/components/feedback/index.js +2 -4
- package/es/components/feedback/index.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.d.ts +9 -2
- package/es/components/feedback/src/feedback-buttons.js +24 -15
- package/es/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.template.d.ts +2 -2
- package/es/components/feedback/src/feedback-buttons.template.js.map +1 -1
- package/es/components/feedback/src/feedback.d.ts +9 -10
- package/es/components/feedback/src/feedback.js +35 -22
- package/es/components/feedback/src/feedback.js.map +1 -1
- package/es/components/feedback/src/feedback.scss.js +1 -1
- package/es/components/feedback/src/feedback.template.d.ts +2 -2
- package/es/components/feedback/src/feedback.template.js +4 -4
- package/es/components/feedback/src/feedback.template.js.map +1 -1
- package/es/components/markdown/index.d.ts +2 -2
- package/es/components/markdown/index.js +1 -1
- package/es/components/markdown/src/markdown-renderer.d.ts +4 -0
- package/es/components/markdown/src/markdown-renderer.js +16 -11
- package/es/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es/components/markdown/src/markdown.d.ts +42 -14
- package/es/components/markdown/src/markdown.js +146 -42
- package/es/components/markdown/src/markdown.js.map +1 -1
- package/es/components/markdown/src/markdown.scss.js +1 -1
- package/es/components/markdown/src/markdown.template.d.ts +5 -2
- package/es/components/markdown/src/markdown.template.js +8 -3
- package/es/components/markdown/src/markdown.template.js.map +1 -1
- package/es/components/processing/src/processing.d.ts +8 -1
- package/es/components/processing/src/processing.js +7 -10
- package/es/components/processing/src/processing.js.map +1 -1
- package/es/components/processing/src/processing.scss.js +1 -1
- package/es/components/reasoning-steps/index.d.ts +4 -2
- package/es/components/reasoning-steps/index.js +3 -2
- package/es/components/reasoning-steps/index.js.map +1 -1
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.d.ts → reasoning-step.d.ts} +6 -7
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.js → reasoning-step.js} +24 -26
- package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -0
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.scss.js → reasoning-step.scss.js} +1 -1
- package/es/components/reasoning-steps/src/reasoning-step.scss.js.map +1 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +36 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js +81 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +13 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js.map +1 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +3 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js +43 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +1 -0
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.d.ts → reasoning-steps.d.ts} +6 -1
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.js → reasoning-steps.js} +9 -6
- package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -0
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.scss.js → reasoning-steps.scss.js} +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.scss.js.map +1 -0
- package/es/components/table/index.d.ts +2 -2
- package/es/components/table/index.js +1 -1
- package/es/components/table/src/table-pagination.template.d.ts +1 -1
- package/es/components/table/src/{cds-aichat-table.d.ts → table.d.ts} +12 -90
- package/es/components/table/src/{cds-aichat-table.js → table.js} +69 -37
- package/es/components/table/src/table.js.map +1 -0
- package/es/components/table/src/table.template.d.ts +2 -2
- package/es/components/table/src/table.template.js +2 -2
- package/es/components/table/src/table.template.js.map +1 -1
- package/es/components/toolbar/src/toolbar.d.ts +4 -5
- package/es/components/toolbar/src/toolbar.js +51 -40
- package/es/components/toolbar/src/toolbar.js.map +1 -1
- package/es/components/toolbar/src/toolbar.scss.js +1 -1
- package/es/components/workspace-shell/index.d.ts +0 -1
- package/es/components/workspace-shell/index.js +0 -1
- package/es/components/workspace-shell/index.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-body.d.ts +1 -0
- package/es/components/workspace-shell/src/workspace-shell-body.js +3 -4
- package/es/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.d.ts +26 -5
- package/es/components/workspace-shell/src/workspace-shell-footer.js +101 -11
- package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.scss.js +13 -0
- package/es/components/workspace-shell/src/workspace-shell-footer.scss.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell-header.d.ts +1 -0
- package/es/components/workspace-shell/src/workspace-shell-header.js +4 -4
- package/es/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-header.scss.js +13 -0
- package/es/components/workspace-shell/src/workspace-shell-header.scss.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell.d.ts +1 -2
- package/es/components/workspace-shell/src/workspace-shell.js +3 -30
- package/es/components/workspace-shell/src/workspace-shell.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell.scss.js +1 -1
- package/es/react/card.d.ts +9 -0
- package/es/react/card.js +43 -0
- package/es/react/card.js.map +1 -0
- package/es/react/chain-of-thought-step.d.ts +4 -0
- package/es/react/chain-of-thought-step.js +32 -0
- package/es/react/chain-of-thought-step.js.map +1 -0
- package/es/react/chain-of-thought-toggle.d.ts +6 -0
- package/es/react/chain-of-thought-toggle.js +31 -0
- package/es/react/chain-of-thought-toggle.js.map +1 -0
- package/es/react/chain-of-thought.d.ts +4 -4
- package/es/react/chain-of-thought.js +7 -3
- package/es/react/chain-of-thought.js.map +1 -1
- package/es/react/code-snippet-card.d.ts +4 -0
- package/es/react/{code-snippet-tile-container.js → code-snippet-card.js} +8 -7
- package/es/react/code-snippet-card.js.map +1 -0
- package/es/react/feedback-buttons.d.ts +2 -2
- package/es/react/feedback-buttons.js +2 -2
- package/es/react/feedback-buttons.js.map +1 -1
- package/es/react/feedback.d.ts +2 -2
- package/es/react/feedback.js +2 -2
- package/es/react/feedback.js.map +1 -1
- package/es/react/inline-notification.d.ts +4 -0
- package/es/react/inline-notification.js +28 -0
- package/es/react/inline-notification.js.map +1 -0
- package/es/react/markdown.d.ts +1 -1
- package/es/react/markdown.js +1 -1
- package/es/react/reasoning-step.d.ts +3 -5
- package/es/react/reasoning-step.js +6 -5
- package/es/react/reasoning-step.js.map +1 -1
- package/es/react/reasoning-steps-toggle.d.ts +6 -0
- package/es/react/reasoning-steps-toggle.js +31 -0
- package/es/react/reasoning-steps-toggle.js.map +1 -0
- package/es/react/reasoning-steps.d.ts +3 -2
- package/es/react/reasoning-steps.js +4 -3
- package/es/react/reasoning-steps.js.map +1 -1
- package/es/react/tag.d.ts +4 -0
- package/es/react/{tile-container.js → tag.js} +6 -6
- package/es/react/tag.js.map +1 -0
- package/es/react/tile.js +2 -2
- package/es/react/tile.js.map +1 -1
- package/es/react/tool-call-data.d.ts +4 -0
- package/es/react/tool-call-data.js +28 -0
- package/es/react/tool-call-data.js.map +1 -0
- package/es/react/workspace-shell.d.ts +11 -0
- package/es/react/workspace-shell.js +49 -0
- package/es/react/workspace-shell.js.map +1 -0
- package/package.json +3 -3
- package/dist/button-D0B6NYRE.js +0 -157
- package/dist/button-skeleton-DtWa12gC.js +0 -116
- package/dist/checkbox-skeleton-BRqpmcmn.js +0 -166
- package/dist/class-map-BFgXCWx_.js +0 -106
- package/dist/codemirror-runtime-DCCflgzA.js +0 -173
- package/dist/index-B6_FOiFX.js +0 -91
- package/dist/index-BBF0opyU.js +0 -91
- package/dist/index-BIpfdWsb.js +0 -91
- package/dist/index-BamxlG85.js +0 -91
- package/dist/index-BnJifpJy.js +0 -91
- package/dist/index-BychCoXU.js +0 -91
- package/dist/index-CBCqx8Ps.js +0 -91
- package/dist/index-CBqFie3c.js +0 -91
- package/dist/index-CDTaA9BR.js +0 -91
- package/dist/index-CQp4LKsc.js +0 -91
- package/dist/index-CmBp-bbC.js +0 -168
- package/dist/index-D0SnJ7Ma.js +0 -91
- package/dist/index-D4zxQxf2.js +0 -91
- package/dist/index-DMzbawFt.js +0 -91
- package/dist/index-DTqHKU78.js +0 -91
- package/dist/index-Dj8jVVfA.js +0 -91
- package/dist/index-DqC-5dY5.js +0 -91
- package/dist/index-LHYDalJY.js +0 -91
- package/dist/index-MyumuXWu.js +0 -91
- package/dist/index-hvhxkyxb.js +0 -91
- package/dist/index-tpV6AVN_.js +0 -91
- package/dist/index-zZ0xfJxK.js +0 -367
- package/dist/query-Sqf3k5tK.js +0 -101
- package/dist/radio-group-manager-BqksDnno.js +0 -91
- package/dist/repeat-Cu9vY9y8.js +0 -96
- package/dist/text-input-BlvU8QGo.js +0 -158
- package/dist/tile-container.min.js +0 -100
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.d.ts +0 -15
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.js +0 -36
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.js.map +0 -1
- package/es/components/chain-of-thought/src/chain-of-thought.template.d.ts +0 -5
- package/es/components/chain-of-thought/src/chain-of-thought.template.js +0 -206
- package/es/components/chain-of-thought/src/chain-of-thought.template.js.map +0 -1
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.d.ts +0 -10
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.js +0 -50
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.js.map +0 -1
- package/es/components/chain-of-thought/src/types.d.ts +0 -73
- package/es/components/chain-of-thought/src/types.js.map +0 -1
- package/es/components/code-snippet/src/code-snippet-tile-container.d.ts +0 -32
- package/es/components/code-snippet/src/code-snippet-tile-container.js +0 -143
- package/es/components/code-snippet/src/code-snippet-tile-container.js.map +0 -1
- package/es/components/feedback/src/cds-aichat-feedback-buttons.d.ts +0 -15
- package/es/components/feedback/src/cds-aichat-feedback-buttons.js +0 -36
- package/es/components/feedback/src/cds-aichat-feedback-buttons.js.map +0 -1
- package/es/components/feedback/src/cds-aichat-feedback.d.ts +0 -15
- package/es/components/feedback/src/cds-aichat-feedback.js +0 -36
- package/es/components/feedback/src/cds-aichat-feedback.js.map +0 -1
- package/es/components/markdown/src/cds-aichat-markdown.d.ts +0 -13
- package/es/components/markdown/src/cds-aichat-markdown.js +0 -35
- package/es/components/markdown/src/cds-aichat-markdown.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.scss.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.scss.js.map +0 -1
- package/es/components/table/src/cds-aichat-table.js.map +0 -1
- package/es/components/tile-container/index.d.ts +0 -1
- package/es/components/tile-container/src/styles.scss.js +0 -13
- package/es/components/tile-container/src/styles.scss.js.map +0 -1
- package/es/components/tile-container/src/tile-container.d.ts +0 -12
- package/es/components/tile-container/src/tile-container.js +0 -85
- package/es/components/tile-container/src/tile-container.js.map +0 -1
- package/es/components/tile-container/src/tile-container.scss.js.map +0 -1
- package/es/components/workspace-shell/src/styles.scss.js +0 -13
- package/es/components/workspace-shell/src/styles.scss.js.map +0 -1
- package/es/components/workspace-shell/src/workspace-shell-toolbar.d.ts +0 -22
- package/es/components/workspace-shell/src/workspace-shell-toolbar.js +0 -61
- package/es/components/workspace-shell/src/workspace-shell-toolbar.js.map +0 -1
- package/es/react/code-snippet-tile-container.d.ts +0 -5
- package/es/react/code-snippet-tile-container.js.map +0 -1
- package/es/react/tile-container.d.ts +0 -4
- package/es/react/tile-container.js.map +0 -1
- package/dist/{16-Qupth_aH.js → 16-D66oSSKJ.js} +20 -20
- package/dist/{apl-BgtIAmDL.js → apl-Cq2qnGBp.js} +20 -20
- package/dist/{asciiarmor-tEIRKlaD.js → asciiarmor-Cb5hNJXm.js} +20 -20
- package/dist/{asn1-sXfvlwbA.js → asn1-ObfPhj90.js} +20 -20
- package/dist/{asterisk-CkP9KBn_.js → asterisk-CGEdhmtE.js} +20 -20
- package/dist/{carbon-element-CMnOQRY8.js → carbon-element-BHXvTuS8.js} +20 -20
- package/dist/{carbon-element-B18tSkZ6.js → carbon-element-CY_4MezR.js} +20 -20
- package/dist/{clike-Dz7-b3Bs.js → clike-D-W_e6Lj.js} +20 -20
- package/dist/{clojure-Cv2VjSR-.js → clojure-BKr3NaqS.js} +20 -20
- package/dist/{cmake-B7mApY_A.js → cmake-CCO4hHlz.js} +20 -20
- package/dist/{cobol-CLpo2wzU.js → cobol-BP7APbz-.js} +20 -20
- package/dist/{coffeescript-Cp4m_frl.js → coffeescript-DAdmYC08.js} +20 -20
- package/dist/{collection-helpers-CVjseChk.js → collection-helpers-CeBujCju.js} +20 -20
- package/dist/{commonlisp-DGHzJz_w.js → commonlisp-Bo8JYmEV.js} +20 -20
- package/dist/{crystal-D8zlcNoF.js → crystal-Bm8pGIh6.js} +20 -20
- package/dist/{css-gJR1aLn3.js → css-BJk1lVKu.js} +20 -20
- package/dist/{custom-element-Clzn_oL-.js → custom-element-DRG4IpGT.js} +20 -20
- package/dist/{cypher-CM68cGds.js → cypher-D-eVDQC7.js} +20 -20
- package/dist/{d-DS7hYUri.js → d-D9LdG4k3.js} +20 -20
- package/dist/{diff-BchMez5u.js → diff-DZtMXlRt.js} +20 -20
- package/dist/{dtd-B4jYcQ7M.js → dtd-BkbtUIcB.js} +20 -20
- package/dist/{dylan-DK2Dyib7.js → dylan-CCohaM4H.js} +20 -20
- package/dist/{ebnf-Cn6Vnzxw.js → ebnf-DtT6UrMv.js} +20 -20
- package/dist/{ecl-9PhKPFNU.js → ecl-C2GNxTt8.js} +20 -20
- package/dist/{eiffel-CqAx-iZ-.js → eiffel-BW4n6uyg.js} +20 -20
- package/dist/{elm-Cw3MFe2J.js → elm-B9lXrM6D.js} +20 -20
- package/dist/{erlang-DeNh2sjw.js → erlang-BKwBedv4.js} +20 -20
- package/dist/{fcl-Dku8gwKl.js → fcl-BGYmKRZe.js} +20 -20
- package/dist/{forth-ccFEopc8.js → forth-DTbOVELu.js} +20 -20
- package/dist/{fortran-C0Pd1bYf.js → fortran-Dr7q8x3V.js} +20 -20
- package/dist/{gas-C9KeMzH-.js → gas-CsCwQ5DC.js} +20 -20
- package/dist/{gherkin-CTd3ycq1.js → gherkin-CAJyZEc1.js} +20 -20
- package/dist/{groovy-C2OuB7B3.js → groovy-CpFdbfFQ.js} +20 -20
- package/dist/{haskell-CGuEw9Yh.js → haskell-V36thOn1.js} +20 -20
- package/dist/{haxe-Bpicn7Ma.js → haxe-CeQWqhmF.js} +20 -20
- package/dist/{http-C2Dl8BK6.js → http-Cm3L1exf.js} +20 -20
- package/dist/{idl-D0DUTXQY.js → idl-DyN-eyoA.js} +20 -20
- package/dist/{javascript-vBL1foWi.js → javascript-B7L-ezNz.js} +20 -20
- package/dist/{julia-YTKmImms.js → julia-B_bgxt8f.js} +20 -20
- package/dist/{livescript-BqlKQjy2.js → livescript-B0UjDUzz.js} +20 -20
- package/dist/{lua-DlwCIvBO.js → lua-Bs-1T_TR.js} +20 -20
- package/dist/{mathematica-Dv2FPQ3c.js → mathematica-QbiSkUw_.js} +20 -20
- package/dist/{mbox-BRYTWZIN.js → mbox-IxVDt6G7.js} +20 -20
- package/dist/{mirc-Bfe4ByuU.js → mirc--MFZdywV.js} +20 -20
- package/dist/{mllike-jcboaTW3.js → mllike-s7nUnXIp.js} +20 -20
- package/dist/{modelica-DyjAoT58.js → modelica-BCpZ0s1C.js} +20 -20
- package/dist/{mscgen-cDZZxW92.js → mscgen-Br8J94Pi.js} +20 -20
- package/dist/{mumps-BHJOz0VL.js → mumps-BsSCi6Lf.js} +20 -20
- package/dist/{nginx-C7Xm6ldH.js → nginx-ZiZlz_Vj.js} +20 -20
- package/dist/{ntriples-WgSzAP5x.js → ntriples-1fM-fgdb.js} +20 -20
- package/dist/{octave-D4LNKBtY.js → octave-nXauetiK.js} +20 -20
- package/dist/{oz-BoqKtF9D.js → oz-B13mLmyp.js} +20 -20
- package/dist/{pascal-Di4a6U4m.js → pascal-B_W4OXqj.js} +20 -20
- package/dist/{perl-DidNKejT.js → perl-a1VQ4XvC.js} +20 -20
- package/dist/{pig-BNb2vBfH.js → pig-BtQy1wID.js} +20 -20
- package/dist/{powershell-BKZXxjKi.js → powershell-uO49D63Q.js} +20 -20
- package/dist/{properties-DGvo0ocD.js → properties-BhuX6-mY.js} +20 -20
- package/dist/{protobuf-CO4RB5i_.js → protobuf-CNIIc7zI.js} +20 -20
- package/dist/{puppet-BuoIdj3c.js → puppet-ByObhsu2.js} +20 -20
- package/dist/{python-D0eLBtFd.js → python-PHhd4JZq.js} +20 -20
- package/dist/{q-C5wfDOE6.js → q-qVcarjaG.js} +20 -20
- package/dist/{r-B2NBzJ7Q.js → r-Cd28Rn61.js} +20 -20
- package/dist/{rpm-bppY7Ljs.js → rpm-tHd62SNx.js} +20 -20
- package/dist/{ruby-1BC0cOBU.js → ruby-BWVi67xq.js} +20 -20
- package/dist/{sas-BeMF8yJO.js → sas-BwjQFPr2.js} +20 -20
- package/dist/{scheme-CIQ0ih8s.js → scheme-Czr-sVIy.js} +20 -20
- package/dist/{settings-DtiFDQAJ.js → settings-C6RJ_X7P.js} +20 -20
- package/dist/{shell-Aikfsln6.js → shell-BetDWStl.js} +20 -20
- package/dist/{sieve-AcrCVYff.js → sieve-rrPKwsBh.js} +20 -20
- package/dist/{simple-mode-pAhBuoYJ.js → simple-mode-C8-rTa2M.js} +20 -20
- package/dist/{smalltalk-B2nQQuEp.js → smalltalk-YAI5xh7_.js} +20 -20
- package/dist/{solr-dRPr0Biz.js → solr-VDOKdk1b.js} +20 -20
- package/dist/{sparql-Cj99XEDx.js → sparql-zO1kYCog.js} +20 -20
- package/dist/{spreadsheet-sgTJtcQB.js → spreadsheet-6g8nHE2j.js} +20 -20
- package/dist/{sql-C8kOX3sr.js → sql-Biw9poPQ.js} +20 -20
- package/dist/{stex-7QvUJU5I.js → stex-THaXVwNW.js} +20 -20
- package/dist/{stylus-DkIl6udx.js → stylus-RHXL_HsJ.js} +20 -20
- package/dist/{swift-BjpHlYuP.js → swift-lfFyPRRo.js} +20 -20
- package/dist/{sync-CTB9Fa1m.js → sync-D5E2V6_l.js} +20 -20
- package/dist/{tcl-C1Yvc7pn.js → tcl-C4Tb2U0q.js} +20 -20
- package/dist/{textile-DKmSRPjM.js → textile-CnQDonvJ.js} +20 -20
- package/dist/{throttle-Bas3c59v.js → throttle-B7gS0Tg4.js} +20 -20
- package/dist/{tiddlywiki-DN1bYf4c.js → tiddlywiki-BPc4WZCH.js} +20 -20
- package/dist/{tiki-F3wxU3m-.js → tiki-D4dz8j1V.js} +20 -20
- package/dist/{toml-KiNov0Ms.js → toml-88vYtIh1.js} +20 -20
- package/dist/{troff-BZvX0oqw.js → troff-BgVjEoT-.js} +20 -20
- package/dist/{ttcn-BiJT56Tu.js → ttcn-DdYulzch.js} +20 -20
- package/dist/{ttcn-cfg-3VvAFBAY.js → ttcn-cfg-LwcHiYmJ.js} +20 -20
- package/dist/{turtle-BvExPgO5.js → turtle-CgiVr9yq.js} +20 -20
- package/dist/{vb-D2uTYiVC.js → vb-BWY0HckZ.js} +20 -20
- package/dist/{vbscript-DpTTELsB.js → vbscript-BBJV-ooB.js} +20 -20
- package/dist/{velocity-jIy5jhYQ.js → velocity-wom_bhlv.js} +20 -20
- package/dist/{verilog-CXOzQ6Od.js → verilog-BCY2xdlY.js} +20 -20
- package/dist/{vhdl-Dg-0Ynfd.js → vhdl-BjJYRa0a.js} +20 -20
- package/dist/{webidl-Elhmuz8r.js → webidl-KE8LT1tN.js} +20 -20
- package/dist/{xquery-EKuNgB1T.js → xquery-Ca5C9BJw.js} +20 -20
- package/dist/{yacas-CirFB63Y.js → yacas-DGeGvU7X.js} +20 -20
- package/dist/{z80-D_iQ-043.js → z80-CEYQTt8_.js} +20 -20
|
@@ -16,71 +16,71 @@
|
|
|
16
16
|
* https://www.npmjs.com/package/tslib
|
|
17
17
|
* https://www.npmjs.com/package/lit
|
|
18
18
|
* https://www.npmjs.com/package/markdown-it
|
|
19
|
-
* https://www.npmjs.com/package/dompurify
|
|
20
19
|
* https://www.npmjs.com/package/lodash-es
|
|
20
|
+
* https://www.npmjs.com/package/dompurify
|
|
21
|
+
* https://www.npmjs.com/package/@codemirror/state
|
|
21
22
|
* https://www.npmjs.com/package/csv-stringify
|
|
22
23
|
* https://www.npmjs.com/package/lit-html
|
|
23
24
|
* https://www.npmjs.com/package/@carbon/web-components
|
|
24
25
|
* https://www.npmjs.com/package/codemirror
|
|
25
|
-
* https://www.npmjs.com/package/@codemirror/state
|
|
26
26
|
* https://www.npmjs.com/package/@codemirror/language
|
|
27
|
-
* https://www.npmjs.com/package/@codemirror/autocomplete
|
|
28
27
|
* https://www.npmjs.com/package/@codemirror/commands
|
|
29
28
|
* https://www.npmjs.com/package/@codemirror/view
|
|
29
|
+
* https://www.npmjs.com/package/@codemirror/autocomplete
|
|
30
30
|
* https://www.npmjs.com/package/@codemirror/lint
|
|
31
31
|
* https://www.npmjs.com/package/@lezer/highlight
|
|
32
32
|
* https://www.npmjs.com/package/@codemirror/lang-sql
|
|
33
|
-
* https://www.npmjs.com/package/@codemirror/lang-css
|
|
34
33
|
* https://www.npmjs.com/package/@codemirror/lang-go
|
|
35
|
-
* https://www.npmjs.com/package/@codemirror/lang-html
|
|
36
34
|
* https://www.npmjs.com/package/@codemirror/lang-cpp
|
|
35
|
+
* https://www.npmjs.com/package/@codemirror/lang-css
|
|
36
|
+
* https://www.npmjs.com/package/@codemirror/lang-html
|
|
37
37
|
* https://www.npmjs.com/package/@codemirror/lang-java
|
|
38
38
|
* https://www.npmjs.com/package/@codemirror/lang-javascript
|
|
39
|
+
* https://www.npmjs.com/package/@codemirror/lang-jinja
|
|
39
40
|
* https://www.npmjs.com/package/@codemirror/lang-json
|
|
40
41
|
* https://www.npmjs.com/package/@codemirror/lang-less
|
|
41
|
-
* https://www.npmjs.com/package/@codemirror/lang-php
|
|
42
42
|
* https://www.npmjs.com/package/@codemirror/lang-liquid
|
|
43
|
+
* https://www.npmjs.com/package/@codemirror/lang-php
|
|
43
44
|
* https://www.npmjs.com/package/@codemirror/lang-markdown
|
|
44
|
-
* https://www.npmjs.com/package/@codemirror/lang-
|
|
45
|
-
* https://www.npmjs.com/package/@codemirror/lang-python
|
|
46
|
-
* https://www.npmjs.com/package/@codemirror/lang-sass
|
|
45
|
+
* https://www.npmjs.com/package/@codemirror/lang-wast
|
|
47
46
|
* https://www.npmjs.com/package/@codemirror/lang-rust
|
|
48
47
|
* https://www.npmjs.com/package/@codemirror/lang-yaml
|
|
48
|
+
* https://www.npmjs.com/package/@codemirror/lang-python
|
|
49
|
+
* https://www.npmjs.com/package/@codemirror/lang-sass
|
|
49
50
|
* https://www.npmjs.com/package/@codemirror/legacy-modes
|
|
50
|
-
* https://www.npmjs.com/package/@codemirror/lang-xml
|
|
51
|
-
* https://www.npmjs.com/package/@codemirror/lang-angular
|
|
52
|
-
* https://www.npmjs.com/package/@codemirror/lang-wast
|
|
53
51
|
* https://www.npmjs.com/package/@codemirror/lang-vue
|
|
52
|
+
* https://www.npmjs.com/package/@codemirror/lang-angular
|
|
53
|
+
* https://www.npmjs.com/package/@codemirror/lang-xml
|
|
54
54
|
* https://www.npmjs.com/package/@carbon/icons
|
|
55
55
|
* https://www.npmjs.com/package/@carbon/utilities
|
|
56
56
|
* https://www.npmjs.com/package/@carbon/icon-helpers
|
|
57
57
|
* https://www.npmjs.com/package/program-language-detector
|
|
58
58
|
* https://www.npmjs.com/package/lit-element
|
|
59
59
|
* https://www.npmjs.com/package/@lit/reactive-element
|
|
60
|
+
* https://www.npmjs.com/package/@marijn/find-cluster-break
|
|
60
61
|
* https://www.npmjs.com/package/@codemirror/search
|
|
61
62
|
* https://www.npmjs.com/package/crelt
|
|
62
63
|
* https://www.npmjs.com/package/w3c-keyname
|
|
63
64
|
* https://www.npmjs.com/package/style-mod
|
|
64
|
-
* https://www.npmjs.com/package/@marijn/find-cluster-break
|
|
65
65
|
* https://www.npmjs.com/package/@lezer/common
|
|
66
|
-
* https://www.npmjs.com/package/@lezer/lr
|
|
67
|
-
* https://www.npmjs.com/package/@lezer/css
|
|
68
66
|
* https://www.npmjs.com/package/@lezer/go
|
|
67
|
+
* https://www.npmjs.com/package/@lezer/lr
|
|
69
68
|
* https://www.npmjs.com/package/@lezer/cpp
|
|
70
69
|
* https://www.npmjs.com/package/@lezer/java
|
|
70
|
+
* https://www.npmjs.com/package/@lezer/css
|
|
71
71
|
* https://www.npmjs.com/package/@lezer/html
|
|
72
|
-
* https://www.npmjs.com/package/@lezer/json
|
|
73
72
|
* https://www.npmjs.com/package/@lezer/javascript
|
|
74
|
-
* https://www.npmjs.com/package/@lezer/python
|
|
75
|
-
* https://www.npmjs.com/package/@lezer/rust
|
|
76
|
-
* https://www.npmjs.com/package/@lezer/markdown
|
|
77
73
|
* https://www.npmjs.com/package/@lezer/php
|
|
74
|
+
* https://www.npmjs.com/package/@lezer/json
|
|
78
75
|
* https://www.npmjs.com/package/@lezer/yaml
|
|
76
|
+
* https://www.npmjs.com/package/@lezer/rust
|
|
77
|
+
* https://www.npmjs.com/package/@lezer/python
|
|
79
78
|
* https://www.npmjs.com/package/@lezer/sass
|
|
79
|
+
* https://www.npmjs.com/package/@lezer/markdown
|
|
80
80
|
* https://www.npmjs.com/package/@lezer/xml
|
|
81
81
|
* https://www.npmjs.com/package/@internationalized/number
|
|
82
|
-
* https://www.npmjs.com/package/linkify-it
|
|
83
82
|
* https://www.npmjs.com/package/mdurl
|
|
83
|
+
* https://www.npmjs.com/package/linkify-it
|
|
84
84
|
* https://www.npmjs.com/package/punycode.js
|
|
85
85
|
* https://www.npmjs.com/package/uc.micro
|
|
86
86
|
* https://www.npmjs.com/package/@floating-ui/dom
|
|
@@ -88,4 +88,4 @@
|
|
|
88
88
|
* https://www.npmjs.com/package/@floating-ui/utils
|
|
89
89
|
*/
|
|
90
90
|
|
|
91
|
-
let t={env:{}};import{P as e,N as s,k as i,D as r,l as h,T as n,I as o}from"./codemirror-runtime-DCCflgzA.js";class a{constructor(t,e,s,i,r,h,n,o,a,l=0,c){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=r,this.score=h,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=l,this.parent=c}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new a(t,[],e,s,s,0,[],0,i?new l(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=65535&t,{parser:r}=this.p,h=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=r.dynamicPrecedence(i);if(n&&(this.score+=n),0==s)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i<r.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,h?8:4,!0),void this.reduceContext(i,this.reducePos);let o=this.stack.length-3*(s-1)-(262144&t?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from,l=this.reducePos-a;l>=2e3&&!(null===(e=this.p.parser.nodeSet.types[i])||void 0===e?void 0:e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSize<l&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=l));let c=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-c;if(i<r.minRepeatTerm||131072&t){let t=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,t,u+4,!0)}if(262144&t)this.state=this.stack[o];else{let t=this.stack[o-3];this.state=r.getGoto(t,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,r=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,i=this.buffer.length;if(0==i&&t.parent&&(i=t.bufferBase-t.parent.bufferBase,t=t.parent),i>0&&0==t.buffer[i-4]&&t.buffer[i-1]>-1){if(e==s)return;if(t.buffer[i-2]>=e)return void(t.buffer[i-2]=s)}}if(r&&this.pos!=s){let r=this.buffer.length;if(r>0&&(0!=this.buffer[r-4]||this.buffer[r-1]<0)){let t=!1;for(let e=r;e>0&&this.buffer[e-2]>s;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}else this.buffer.push(t,e,s,i)}shift(t,e,s,i){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4);else{let r=t,{parser:h}=this.p;(i>this.pos||e<=h.maxNode)&&(this.pos=i,h.stateFlag(r,1)||(this.reducePos=i)),this.pushState(r,s),this.shiftContext(e,s),e<=h.maxNode&&this.buffer.push(e,s,i,4)}}apply(t,e,s,i){65536&t?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new a(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new c(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==s)return!1;if(!(65536&s))return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let s=[];for(let i,r=0;r<e.length;r+=2)(i=e[r+1])!=this.state&&this.p.parser.hasAction(i,t)&&s.push(e[r],i);if(this.stack.length<120)for(let t=0;s.length<8&&t<e.length;t+=2){let i=e[t+1];s.some((t,e)=>1&e&&t==i)||s.push(e[t],i)}e=s}let s=[];for(let t=0;t<e.length&&s.length<4;t+=2){let i=e[t+1];if(i==this.state)continue;let r=this.split();r.pushState(i,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[t],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=65535&e,r=this.stack.length-3*s;if(r<0||t.getGoto(this.stack[r],i,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,r)=>{if(!e.includes(i))return e.push(i),t.allActions(i,e=>{if(393216&e);else if(65536&e){let s=(e>>19)-r;if(s>1){let i=65535&e,r=this.stack.length-3*s;if(r>=0&&t.getGoto(this.stack[r],i,!1)>=0)return s<<19|65536|i}}else{let t=s(e,r+1);if(null!=t)return t}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new l(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return!(t<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class l{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class c{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,s=t>>19;0==s?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(s-1);let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class u{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new u(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new u(this.stack,this.pos,this.index)}}function f(t,e=Uint16Array){if("string"!=typeof t)return t;let s=null;for(let i=0,r=0;i<t.length;){let h=0;for(;;){let e=t.charCodeAt(i++),s=!1;if(126==e){h=65535;break}e>=92&&e--,e>=34&&e--;let r=e-32;if(r>=46&&(r-=46,s=!0),h+=r,s)break;h*=46}s?s[r++]=h:s=new e(h)}return s}class p{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const d=new p;class k{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=d,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,r=this.pos+t;for(;r<s.from;){if(!i)return null;let t=this.ranges[--i];r-=s.from-t.to,s=t}for(;e<0?r>s.to:r>=s.to;){if(i==this.ranges.length-1)return null;let t=this.ranges[++i];r+=t.from-s.to,s=t}return r}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,s,i=this.chunkOff+t;if(i>=0&&i<this.chunk.length)e=this.pos+t,s=this.chunk.charCodeAt(i);else{let i=this.resolveOffset(t,1);if(null==i)return-1;if(e=i,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,i=this.range;for(;i.to<=e;)i=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>i.to&&(this.chunk2=this.chunk2.slice(0,i.to-e)),s=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),s}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(null==s||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=d,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}}class g{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;b(this.data,t,e,this.id,s.data,s.tokenPrecTable)}}g.prototype.contextual=g.prototype.fallback=g.prototype.extend=!1;class m{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data="string"==typeof t?f(t):t}token(t,e){let s=t.pos,i=0;for(;;){let s=t.next<0,r=t.resolveOffset(1,1);if(b(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(s||i++,null==r)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}}m.prototype.contextual=g.prototype.fallback=g.prototype.extend=!1;class x{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function b(t,e,s,i,r,h){let n=0,o=1<<i,{dialect:a}=s.p.parser;t:for(;0!=(o&t[n]);){let s=t[n+1];for(let i=n+3;i<s;i+=2)if((t[i+1]&o)>0){let s=t[i];if(a.allows(s)&&(-1==e.token.value||e.token.value==s||v(s,e.token.value,r,h))){e.acceptToken(s);break}}let i=e.next,l=0,c=t[n+2];if(!(e.next<0&&c>l&&65535==t[s+3*c-3])){for(;l<c;){let r=l+c>>1,h=s+r+(r<<1),o=t[h],a=t[h+1]||65536;if(i<o)c=r;else{if(!(i>=a)){n=t[h+2],e.advance();continue t}l=r+1}}break}n=t[s+3*c-1]}}function S(t,e,s){for(let i,r=e;65535!=(i=t[r]);r++)if(i==s)return r-e;return-1}function v(t,e,s,i){let r=S(s,i,e);return r<0||S(s,i,t)<r}const P=t.env&&/\bparse\b/.test(t.env.LOG);let A=null;function C(t,e,s){let i=t.cursor(o.IncludeAnonymous);for(i.moveTo(e);;)if(!(s<0?i.childBefore(e):i.childAfter(e)))for(;;){if((s<0?i.to<e:i.from>e)&&!i.type.isError)return s<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(s<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return s<0?0:t.length}}class y{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?C(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?C(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=s.children[i],o=this.start[e]+s.positions[i];if(o>t)return this.nextStart=o,null;if(r instanceof n){if(o==t){if(o<this.safeFrom)return null;let t=o+r.length;if(t<=this.safeTo){let e=r.prop(h.lookAhead);if(!e||t+e<this.fragment.to)return r}}this.index[e]++,o+r.length>=Math.max(this.safeFrom,t)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[e]++,this.nextStart=o+r.length}}}class T{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(t=>new p)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:r}=i,h=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let i=0;i<r.length;i++){if(!(1<<i&h))continue;let a=r[i],l=this.tokens[i];if((!s||a.fallback)&&((a.contextual||l.start!=t.pos||l.mask!=h||l.context!=n)&&(this.updateCachedToken(l,a,t),l.mask=h,l.context=n),l.lookAhead>l.end+25&&(o=Math.max(l.lookAhead,o)),0!=l.value)){let i=e;if(l.extended>-1&&(e=this.addActions(t,l.extended,l.end,e)),e=this.addActions(t,l.value,l.end,e),!a.extend&&(s=l,e>i))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),s||t.pos!=this.stream.end||(s=new p,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new p,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:e}=s.p;for(let i=0;i<e.specialized.length;i++)if(e.specialized[i]==t.value){let r=e.specializers[i](this.stream.read(t.start,t.end),s);if(r>=0&&s.p.parser.dialect.allows(r>>1)){1&r?t.extended=r>>1:t.value=r>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let e=0;e<i;e+=3)if(this.actions[e]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:r}=t,{parser:h}=t.p,{data:n}=h;for(let t=0;t<2;t++)for(let o=h.stateSlot(r,t?2:1);;o+=3){if(65535==n[o]){if(1!=n[o+1]){0==i&&2==n[o+1]&&(i=this.putAction(D(n,o+2),e,s,i));break}o=D(n,o+2)}n[o]==e&&(i=this.putAction(D(n,o+1),e,s,i))}return i}}class w{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new k(e,i),this.tokens=new T(t,this.stream),this.topTerm=t.top[1];let{from:r}=i[0];this.stacks=[a.start(this,t.top[0],r)],this.fragments=s.length&&this.stream.end-r>4*t.bufferLength?new y(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,s=this.stacks,i=this.minStackPos,r=this.stacks=[];if(this.bigReductionCount>300&&1==s.length){let[t]=s;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;h<s.length;h++){let n=s[h];for(;;){if(this.tokens.mainToken=null,n.pos>i)r.push(n);else{if(this.advanceStack(n,r,s))continue;{t||(t=[],e=[]),t.push(n);let s=this.tokens.getMainToken(n);e.push(s.value,s.end)}}break}}if(!r.length){let e=t&&function(t){let e=null;for(let s of t){let t=s.p.stoppedAt;(s.pos==s.p.stream.end||null!=t&&s.pos>t)&&s.p.parser.stateFlag(s.state,2)&&(!e||e.score<s.score)&&(e=s)}return e}(t);if(e)return P&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw P&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+i);this.recovering||(this.recovering=5)}if(this.recovering&&t){let s=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,r);if(s)return P&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(r.length>t)for(r.sort((t,e)=>e.score-t.score);r.length>t;)r.pop();r.some(t=>t.reducePos>i)&&this.recovering--}else if(r.length>1){t:for(let t=0;t<r.length-1;t++){let e=r[t];for(let s=t+1;s<r.length;s++){let i=r[s];if(e.sameState(i)||e.buffer.length>500&&i.buffer.length>500){if(!((e.score-i.score||e.buffer.length-i.buffer.length)>0)){r.splice(t--,1);continue t}r.splice(s--,1)}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let t=1;t<r.length;t++)r[t].pos<this.minStackPos&&(this.minStackPos=r[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:r}=this,o=P?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,s=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(i);a;){let i=this.parser.nodeSet.types[a.type.id]==a.type?r.getGoto(t.state,a.type.id):-1;if(i>-1&&a.length&&(!e||(a.prop(h.contextHash)||0)==s))return t.useNode(a,i),P&&console.log(o+this.stackID(t)+` (via reuse of ${r.getName(a.type.id)})`),!0;if(!(a instanceof n)||0==a.children.length||a.positions[0]>0)break;let l=a.children[0];if(!(l instanceof n&&0==a.positions[0]))break;a=l}}let a=r.stateSlot(t.state,4);if(a>0)return t.reduce(a),P&&console.log(o+this.stackID(t)+` (via always-reduce ${r.getName(65535&a)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let l=this.tokens.getActions(t);for(let h=0;h<l.length;){let n=l[h++],a=l[h++],c=l[h++],u=h==l.length||!s,f=u?t:t.split(),p=this.tokens.mainToken;if(f.apply(n,a,p?p.start:f.pos,c),P&&console.log(o+this.stackID(f)+` (via ${65536&n?`reduce of ${r.getName(65535&n)}`:"shift"} for ${r.getName(a)} @ ${i}${f==t?"":", split"})`),u)return!0;f.pos>i?e.push(f):s.push(f)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return N(t,e),!0}}runRecovery(t,e,s){let i=null,r=!1;for(let h=0;h<t.length;h++){let n=t[h],o=e[h<<1],a=e[1+(h<<1)],l=P?this.stackID(n)+" -> ":"";if(n.deadEnd){if(r)continue;if(r=!0,n.restart(),P&&console.log(l+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))continue}let c=n.split(),u=l;for(let t=0;t<10&&c.forceReduce();t++){if(P&&console.log(u+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,s))break;P&&(u=this.stackID(c)+" -> ")}for(let t of n.recoverByInsert(o))P&&console.log(l+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),P&&console.log(l+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),N(n,s)):(!i||i.score<n.score)&&(i=n)}return i}stackToTree(t){return t.close(),n.build({buffer:u.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(A||(A=new WeakMap)).get(t);return e||A.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function N(t,e){for(let s=0;s<e.length;s++){let i=e[s];if(i.pos==t.pos&&i.sameState(t))return void(e[s].score<t.score&&(e[s]=t))}e.push(t)}class R{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||0==this.disabled[t]}}const z=t=>t;class I{constructor(t){this.start=t.start,this.shift=t.shift||z,this.reduce=t.reduce||z,this.reuse=t.reuse||z,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class B extends e{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let s=0;s<t.repeatNodeCount;s++)e.push("");let n=Object.keys(t.topRules).map(e=>t.topRules[e][1]),o=[];for(let t=0;t<e.length;t++)o.push([]);function a(t,e,s){o[t].push([e,e.deserialize(String(s))])}if(t.nodeProps)for(let e of t.nodeProps){let t=e[0];"string"==typeof t&&(t=h[t]);for(let s=1;s<e.length;){let i=e[s++];if(i>=0)a(i,t,e[s++]);else{let r=e[s+-i];for(let h=-i;h>0;h--)a(e[s++],t,r);s++}}}this.nodeSet=new s(e.map((e,s)=>i.define({name:s>=this.minRepeatTerm?void 0:e,id:s,props:o[s],top:n.indexOf(s)>-1,error:0==s,skipped:t.skippedNodes&&t.skippedNodes.indexOf(s)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=r;let l=f(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(O),this.states=f(t.states,Uint32Array),this.data=f(t.stateData),this.goto=f(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(t=>"number"==typeof t?new g(l,t):t),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new w(this,t,e,s);for(let r of this.wrappers)i=r(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let r=i[e+1];;){let e=i[r++],h=1&e,n=i[r++];if(h&&s)return n;for(let s=r+(e>>1);r<s;r++)if(i[r]==t)return n;if(h)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let r,h=this.stateSlot(t,i?2:1);;h+=3){if(65535==(r=s[h])){if(1!=s[h+1]){if(2==s[h+1])return D(s,h+2);break}r=s[h=D(s,h+2)]}if(r==e||0==r)return D(s,h+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,t=>t==e||null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let s=this.stateSlot(t,1);null==i;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=D(this.data,s+2)}i=e(D(this.data,s+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=D(this.data,s+2)}if(!(1&this.data[s+2])){let t=this.data[s+1];e.some((e,s)=>1&s&&e==t)||e.push(this.data[s],t)}}return e}configure(t){let e=Object.assign(Object.create(B.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(e=>{let s=t.tokenizers.find(t=>t.from==e);return s?s.to:e})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let r=t.specializers.find(t=>t.from==s.external);if(!r)return s;let h=Object.assign(Object.assign({},s),{external:r.to});return e.specializers[i]=O(h),h})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let i of t.split(" ")){let t=e.indexOf(i);t>=0&&(s[t]=!0)}let i=null;for(let t=0;t<e.length;t++)if(!s[t])for(let s,r=this.dialects[e[t]];65535!=(s=this.data[r++]);)(i||(i=new Uint8Array(this.maxTerm+1)))[s]=1;return new R(t,s,i)}static deserialize(t){return new B(t)}}function D(t,e){return t[e]|t[e+1]<<16}function O(t){if(t.external){let e=t.extend?1:0;return(s,i)=>t.external(s,i)<<1|e}return t.get}export{I as C,x as E,B as L,m as a};
|
|
91
|
+
let t={env:{}};import{P as e,N as s,j as i,D as r,k as h,T as n,I as o}from"./codemirror-runtime-DjJTvK74.js";class a{constructor(t,e,s,i,r,h,n,o,a,l=0,c){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=r,this.score=h,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=l,this.parent=c}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new a(t,[],e,s,s,0,[],0,i?new l(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=65535&t,{parser:r}=this.p,h=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=r.dynamicPrecedence(i);if(n&&(this.score+=n),0==s)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i<r.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,h?8:4,!0),void this.reduceContext(i,this.reducePos);let o=this.stack.length-3*(s-1)-(262144&t?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from,l=this.reducePos-a;l>=2e3&&!(null===(e=this.p.parser.nodeSet.types[i])||void 0===e?void 0:e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSize<l&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=l));let c=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-c;if(i<r.minRepeatTerm||131072&t){let t=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,t,u+4,!0)}if(262144&t)this.state=this.stack[o];else{let t=this.stack[o-3];this.state=r.getGoto(t,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,r=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,i=this.buffer.length;if(0==i&&t.parent&&(i=t.bufferBase-t.parent.bufferBase,t=t.parent),i>0&&0==t.buffer[i-4]&&t.buffer[i-1]>-1){if(e==s)return;if(t.buffer[i-2]>=e)return void(t.buffer[i-2]=s)}}if(r&&this.pos!=s){let r=this.buffer.length;if(r>0&&(0!=this.buffer[r-4]||this.buffer[r-1]<0)){let t=!1;for(let e=r;e>0&&this.buffer[e-2]>s;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}else this.buffer.push(t,e,s,i)}shift(t,e,s,i){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4);else{let r=t,{parser:h}=this.p;(i>this.pos||e<=h.maxNode)&&(this.pos=i,h.stateFlag(r,1)||(this.reducePos=i)),this.pushState(r,s),this.shiftContext(e,s),e<=h.maxNode&&this.buffer.push(e,s,i,4)}}apply(t,e,s,i){65536&t?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new a(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new c(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==s)return!1;if(!(65536&s))return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let s=[];for(let i,r=0;r<e.length;r+=2)(i=e[r+1])!=this.state&&this.p.parser.hasAction(i,t)&&s.push(e[r],i);if(this.stack.length<120)for(let t=0;s.length<8&&t<e.length;t+=2){let i=e[t+1];s.some((t,e)=>1&e&&t==i)||s.push(e[t],i)}e=s}let s=[];for(let t=0;t<e.length&&s.length<4;t+=2){let i=e[t+1];if(i==this.state)continue;let r=this.split();r.pushState(i,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[t],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=65535&e,r=this.stack.length-3*s;if(r<0||t.getGoto(this.stack[r],i,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,r)=>{if(!e.includes(i))return e.push(i),t.allActions(i,e=>{if(393216&e);else if(65536&e){let s=(e>>19)-r;if(s>1){let i=65535&e,r=this.stack.length-3*s;if(r>=0&&t.getGoto(this.stack[r],i,!1)>=0)return s<<19|65536|i}}else{let t=s(e,r+1);if(null!=t)return t}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new l(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return!(t<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class l{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class c{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,s=t>>19;0==s?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(s-1);let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class u{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new u(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new u(this.stack,this.pos,this.index)}}function f(t,e=Uint16Array){if("string"!=typeof t)return t;let s=null;for(let i=0,r=0;i<t.length;){let h=0;for(;;){let e=t.charCodeAt(i++),s=!1;if(126==e){h=65535;break}e>=92&&e--,e>=34&&e--;let r=e-32;if(r>=46&&(r-=46,s=!0),h+=r,s)break;h*=46}s?s[r++]=h:s=new e(h)}return s}class p{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const d=new p;class k{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=d,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,r=this.pos+t;for(;r<s.from;){if(!i)return null;let t=this.ranges[--i];r-=s.from-t.to,s=t}for(;e<0?r>s.to:r>=s.to;){if(i==this.ranges.length-1)return null;let t=this.ranges[++i];r+=t.from-s.to,s=t}return r}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,s,i=this.chunkOff+t;if(i>=0&&i<this.chunk.length)e=this.pos+t,s=this.chunk.charCodeAt(i);else{let i=this.resolveOffset(t,1);if(null==i)return-1;if(e=i,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,i=this.range;for(;i.to<=e;)i=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>i.to&&(this.chunk2=this.chunk2.slice(0,i.to-e)),s=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),s}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(null==s||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=d,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}}class g{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;b(this.data,t,e,this.id,s.data,s.tokenPrecTable)}}g.prototype.contextual=g.prototype.fallback=g.prototype.extend=!1;class m{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data="string"==typeof t?f(t):t}token(t,e){let s=t.pos,i=0;for(;;){let s=t.next<0,r=t.resolveOffset(1,1);if(b(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(s||i++,null==r)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}}m.prototype.contextual=g.prototype.fallback=g.prototype.extend=!1;class x{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function b(t,e,s,i,r,h){let n=0,o=1<<i,{dialect:a}=s.p.parser;t:for(;0!=(o&t[n]);){let s=t[n+1];for(let i=n+3;i<s;i+=2)if((t[i+1]&o)>0){let s=t[i];if(a.allows(s)&&(-1==e.token.value||e.token.value==s||v(s,e.token.value,r,h))){e.acceptToken(s);break}}let i=e.next,l=0,c=t[n+2];if(!(e.next<0&&c>l&&65535==t[s+3*c-3])){for(;l<c;){let r=l+c>>1,h=s+r+(r<<1),o=t[h],a=t[h+1]||65536;if(i<o)c=r;else{if(!(i>=a)){n=t[h+2],e.advance();continue t}l=r+1}}break}n=t[s+3*c-1]}}function S(t,e,s){for(let i,r=e;65535!=(i=t[r]);r++)if(i==s)return r-e;return-1}function v(t,e,s,i){let r=S(s,i,e);return r<0||S(s,i,t)<r}const P=t.env&&/\bparse\b/.test(t.env.LOG);let A=null;function C(t,e,s){let i=t.cursor(o.IncludeAnonymous);for(i.moveTo(e);;)if(!(s<0?i.childBefore(e):i.childAfter(e)))for(;;){if((s<0?i.to<e:i.from>e)&&!i.type.isError)return s<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(s<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return s<0?0:t.length}}class y{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?C(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?C(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=s.children[i],o=this.start[e]+s.positions[i];if(o>t)return this.nextStart=o,null;if(r instanceof n){if(o==t){if(o<this.safeFrom)return null;let t=o+r.length;if(t<=this.safeTo){let e=r.prop(h.lookAhead);if(!e||t+e<this.fragment.to)return r}}this.index[e]++,o+r.length>=Math.max(this.safeFrom,t)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[e]++,this.nextStart=o+r.length}}}class T{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(t=>new p)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:r}=i,h=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let i=0;i<r.length;i++){if(!(1<<i&h))continue;let a=r[i],l=this.tokens[i];if((!s||a.fallback)&&((a.contextual||l.start!=t.pos||l.mask!=h||l.context!=n)&&(this.updateCachedToken(l,a,t),l.mask=h,l.context=n),l.lookAhead>l.end+25&&(o=Math.max(l.lookAhead,o)),0!=l.value)){let i=e;if(l.extended>-1&&(e=this.addActions(t,l.extended,l.end,e)),e=this.addActions(t,l.value,l.end,e),!a.extend&&(s=l,e>i))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),s||t.pos!=this.stream.end||(s=new p,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new p,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:e}=s.p;for(let i=0;i<e.specialized.length;i++)if(e.specialized[i]==t.value){let r=e.specializers[i](this.stream.read(t.start,t.end),s);if(r>=0&&s.p.parser.dialect.allows(r>>1)){1&r?t.extended=r>>1:t.value=r>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let e=0;e<i;e+=3)if(this.actions[e]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:r}=t,{parser:h}=t.p,{data:n}=h;for(let t=0;t<2;t++)for(let o=h.stateSlot(r,t?2:1);;o+=3){if(65535==n[o]){if(1!=n[o+1]){0==i&&2==n[o+1]&&(i=this.putAction(D(n,o+2),e,s,i));break}o=D(n,o+2)}n[o]==e&&(i=this.putAction(D(n,o+1),e,s,i))}return i}}class w{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new k(e,i),this.tokens=new T(t,this.stream),this.topTerm=t.top[1];let{from:r}=i[0];this.stacks=[a.start(this,t.top[0],r)],this.fragments=s.length&&this.stream.end-r>4*t.bufferLength?new y(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,s=this.stacks,i=this.minStackPos,r=this.stacks=[];if(this.bigReductionCount>300&&1==s.length){let[t]=s;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;h<s.length;h++){let n=s[h];for(;;){if(this.tokens.mainToken=null,n.pos>i)r.push(n);else{if(this.advanceStack(n,r,s))continue;{t||(t=[],e=[]),t.push(n);let s=this.tokens.getMainToken(n);e.push(s.value,s.end)}}break}}if(!r.length){let e=t&&function(t){let e=null;for(let s of t){let t=s.p.stoppedAt;(s.pos==s.p.stream.end||null!=t&&s.pos>t)&&s.p.parser.stateFlag(s.state,2)&&(!e||e.score<s.score)&&(e=s)}return e}(t);if(e)return P&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw P&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+i);this.recovering||(this.recovering=5)}if(this.recovering&&t){let s=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,r);if(s)return P&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(r.length>t)for(r.sort((t,e)=>e.score-t.score);r.length>t;)r.pop();r.some(t=>t.reducePos>i)&&this.recovering--}else if(r.length>1){t:for(let t=0;t<r.length-1;t++){let e=r[t];for(let s=t+1;s<r.length;s++){let i=r[s];if(e.sameState(i)||e.buffer.length>500&&i.buffer.length>500){if(!((e.score-i.score||e.buffer.length-i.buffer.length)>0)){r.splice(t--,1);continue t}r.splice(s--,1)}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let t=1;t<r.length;t++)r[t].pos<this.minStackPos&&(this.minStackPos=r[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:r}=this,o=P?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,s=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(i);a;){let i=this.parser.nodeSet.types[a.type.id]==a.type?r.getGoto(t.state,a.type.id):-1;if(i>-1&&a.length&&(!e||(a.prop(h.contextHash)||0)==s))return t.useNode(a,i),P&&console.log(o+this.stackID(t)+` (via reuse of ${r.getName(a.type.id)})`),!0;if(!(a instanceof n)||0==a.children.length||a.positions[0]>0)break;let l=a.children[0];if(!(l instanceof n&&0==a.positions[0]))break;a=l}}let a=r.stateSlot(t.state,4);if(a>0)return t.reduce(a),P&&console.log(o+this.stackID(t)+` (via always-reduce ${r.getName(65535&a)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let l=this.tokens.getActions(t);for(let h=0;h<l.length;){let n=l[h++],a=l[h++],c=l[h++],u=h==l.length||!s,f=u?t:t.split(),p=this.tokens.mainToken;if(f.apply(n,a,p?p.start:f.pos,c),P&&console.log(o+this.stackID(f)+` (via ${65536&n?`reduce of ${r.getName(65535&n)}`:"shift"} for ${r.getName(a)} @ ${i}${f==t?"":", split"})`),u)return!0;f.pos>i?e.push(f):s.push(f)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return N(t,e),!0}}runRecovery(t,e,s){let i=null,r=!1;for(let h=0;h<t.length;h++){let n=t[h],o=e[h<<1],a=e[1+(h<<1)],l=P?this.stackID(n)+" -> ":"";if(n.deadEnd){if(r)continue;if(r=!0,n.restart(),P&&console.log(l+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))continue}let c=n.split(),u=l;for(let t=0;t<10&&c.forceReduce();t++){if(P&&console.log(u+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,s))break;P&&(u=this.stackID(c)+" -> ")}for(let t of n.recoverByInsert(o))P&&console.log(l+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),P&&console.log(l+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),N(n,s)):(!i||i.score<n.score)&&(i=n)}return i}stackToTree(t){return t.close(),n.build({buffer:u.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(A||(A=new WeakMap)).get(t);return e||A.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function N(t,e){for(let s=0;s<e.length;s++){let i=e[s];if(i.pos==t.pos&&i.sameState(t))return void(e[s].score<t.score&&(e[s]=t))}e.push(t)}class R{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||0==this.disabled[t]}}const z=t=>t;class I{constructor(t){this.start=t.start,this.shift=t.shift||z,this.reduce=t.reduce||z,this.reuse=t.reuse||z,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class B extends e{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let s=0;s<t.repeatNodeCount;s++)e.push("");let n=Object.keys(t.topRules).map(e=>t.topRules[e][1]),o=[];for(let t=0;t<e.length;t++)o.push([]);function a(t,e,s){o[t].push([e,e.deserialize(String(s))])}if(t.nodeProps)for(let e of t.nodeProps){let t=e[0];"string"==typeof t&&(t=h[t]);for(let s=1;s<e.length;){let i=e[s++];if(i>=0)a(i,t,e[s++]);else{let r=e[s+-i];for(let h=-i;h>0;h--)a(e[s++],t,r);s++}}}this.nodeSet=new s(e.map((e,s)=>i.define({name:s>=this.minRepeatTerm?void 0:e,id:s,props:o[s],top:n.indexOf(s)>-1,error:0==s,skipped:t.skippedNodes&&t.skippedNodes.indexOf(s)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=r;let l=f(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(O),this.states=f(t.states,Uint32Array),this.data=f(t.stateData),this.goto=f(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(t=>"number"==typeof t?new g(l,t):t),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new w(this,t,e,s);for(let r of this.wrappers)i=r(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let r=i[e+1];;){let e=i[r++],h=1&e,n=i[r++];if(h&&s)return n;for(let s=r+(e>>1);r<s;r++)if(i[r]==t)return n;if(h)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let r,h=this.stateSlot(t,i?2:1);;h+=3){if(65535==(r=s[h])){if(1!=s[h+1]){if(2==s[h+1])return D(s,h+2);break}r=s[h=D(s,h+2)]}if(r==e||0==r)return D(s,h+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,t=>t==e||null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let s=this.stateSlot(t,1);null==i;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=D(this.data,s+2)}i=e(D(this.data,s+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=D(this.data,s+2)}if(!(1&this.data[s+2])){let t=this.data[s+1];e.some((e,s)=>1&s&&e==t)||e.push(this.data[s],t)}}return e}configure(t){let e=Object.assign(Object.create(B.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(e=>{let s=t.tokenizers.find(t=>t.from==e);return s?s.to:e})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let r=t.specializers.find(t=>t.from==s.external);if(!r)return s;let h=Object.assign(Object.assign({},s),{external:r.to});return e.specializers[i]=O(h),h})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let i of t.split(" ")){let t=e.indexOf(i);t>=0&&(s[t]=!0)}let i=null;for(let t=0;t<e.length;t++)if(!s[t])for(let s,r=this.dialects[e[t]];65535!=(s=this.data[r++]);)(i||(i=new Uint8Array(this.maxTerm+1)))[s]=1;return new R(t,s,i)}static deserialize(t){return new B(t)}}function D(t,e){return t[e]|t[e+1]<<16}function O(t){if(t.external){let e=t.extend?1:0;return(s,i)=>t.external(s,i)<<1|e}return t.get}export{I as C,x as E,B as L,m as a};
|